I am using Selenium IDE for the first and has no knowledge of automation scripting. So far i am able to manage using IDE but one issue is I am not able to select a value from drop down list randomly rather entering the index or label values manually every time.
Can anyone please help me with this.
Thank You
I tried the below and it worked
Command: Select
Target : element Locator eg : id = card
Value : index=1
Use command select(selectLocator, optionLocator)
, 'selectLocator' is the Id of the drop down from which the value is being selected and the 'optionLocator' is the value being selected.
For eg: say a drop down having Id="//select[@id='type'"
with values like 'TypeA, TypeB, TypeC,...'. If you are selecting 'TypeA' from the drop down, your command should go like this:
selenium.select("//select[@id='type']", "label=TypeA");
I hope this will solve your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With