This is a migrated thread and some comments may be shown as answers.

Can't click on option on selectbox

1 Answer 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vlad
Top achievements
Rank 1
Vlad asked on 27 Feb 2013, 05:33 PM
Hi,

how can i click on option in select box? I need to click the left mouse button on the Text2.

<select name="_ctl0:PlaceHolderMain:ClaimsLogonSelector" onchange="javascript:setTimeout('__doPostBack(\'_ctl0$PlaceHolderMain$ClaimsLogonSelector\',\'\')', 0)" language="javascript" id="_ctl0_PlaceHolderMain_ClaimsLogonSelector">
    <option selected="selected" value="none"></option>
    <option value="Windows">Text1</option>
    <option value="Forms">Text2</option>


1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 27 Feb 2013, 07:59 PM
Hello Vlad,

Thanks for providing the HTML code snippet. You can use the following code to select the "Text2" option from the HTML select control.
HtmlSelect select = ActiveBrowser.Find.ById<HtmlSelect>("_ctl0_PlaceHolderMain_ClaimsLogonSelector");
select.SelectByText("Text2", true);

See this video for a demonstration.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Vlad
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or