how to select value from a drop down using Selenium IDE

前端 未结 9 2685
灰色年华
灰色年华 2021-02-20 09:26

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 dr

9条回答
  •  [愿得一人]
    2021-02-20 09:47

    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.

提交回复
热议问题