How to click random checkbox
Page 1 of 1 • Share •
How to click random checkbox
Hi all,
Currently I am learing about selenium IDE. I have problem with a testcase please help me!
In my screen has list of checkboxes. User can select more than one checkbox.
I record all steps of this testcase but when playback it I want to select random checkbox.
So What's command to select random checkbox?
Currently I am learing about selenium IDE. I have problem with a testcase please help me!
In my screen has list of checkboxes. User can select more than one checkbox.
I record all steps of this testcase but when playback it I want to select random checkbox.
So What's command to select random checkbox?
hp20712- Posts: 1
Join date: 2010-08-02
Re: How to click random checkbox
hi,
There is no way to get select the random id in selenium IDE directly. You have to write javascript code for it which is a bi task for beginner level.
What you can do it to provide checkbox locator in you script according to your need every time you run script.
If you want to want to do it programatically:
1. store all checkbox locator into an array.
2. calculate the length of array.
3. pass that length into random function.
4. whatever random number you get , select that element.
Best of luck.
bye
There is no way to get select the random id in selenium IDE directly. You have to write javascript code for it which is a bi task for beginner level.
What you can do it to provide checkbox locator in you script according to your need every time you run script.
If you want to want to do it programatically:
1. store all checkbox locator into an array.
2. calculate the length of array.
3. pass that length into random function.
4. whatever random number you get , select that element.
Best of luck.
bye
Similar topics» click aici Pentru a invata cum sa joci Foarte Bine cs !!!
» Random Derek
» Random Youtube Videos
» Not able to click on "checkbox"
» Which value should I define, to let selenium to click on all checkboxes, which have a specific css-class?
» Random Derek
» Random Youtube Videos
» Not able to click on "checkbox"
» Which value should I define, to let selenium to click on all checkboxes, which have a specific css-class?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum

» sample webdriver code for php users
» which standalone server to use
» Dynamic Drop Down Selection
» It is possible to find list of all URL's exist in any web page in selenium ide
» It is possible to compare 2 same images in selenium IDE.
» how to compare 2 ULR's which is exist in same web page (View page source).
» Web Driver: Unable to click a link present inside the frame of a frameset
» Help me to get dynamicaly loaded options of dropdown in Selenium RC -Junit test case