Can't click on option on selectbox

2 posts, 0 answers
  1. Vlad
    Vlad avatar
    5 posts
    Member since:
    Feb 2013

    Posted 27 Feb 2013 Link to this post

    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>


  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 27 Feb 2013 Link to this post

    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
Back to Top