18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

How do i store a value from the dropdown box to a variable?

GeorgeGeorge Members
edited November -1 in Sahi - Open Source
Build: 2011-07-19
OS : windows 7
browser : firefox 7.0.1

How do i store a value from the dropdown box to a variable?
for eg:
_setSelected(_select("ctl00\$ContentPlaceHolder1\$ddlJobCategory"), "Accounts");

i want to store the above value (it may be Accounts or Engineering or whatever) to a variable $var1 ... what is the syntax

George

Comments

  • Hi George

    with the .text method, you should get the values of a select field.
    Change the options index to get the right entry
    var $var1 = _select("Idenfitier").options[2].text

    Regards
    Wormi
Sign In or Register to comment.