Select the values from drop down

How to select all values from drop down  in selenium and how to all values from
dropdown

Default Asked on December 28, 2016 in Selenium WebDriver.
Add Comment
  • 2 Answer(s)

    To select all the values from the dropdown

      • Check manually if the dropdown supports select the multiple options fucntionality (As there are dropdowns that doesnt support your requirement)

     

      • You can send Control key using Robot Framework and send clicks to the options in the dropdown

     

      • Or Alternatively you can write a for() loop

     

     

     

    Default Answered on January 11, 2017.
    Add Comment

    DataTable dt= dc.datacall(“select * from tablename”);
    dropdownlist.DataSource = dt;
    dropdownlist.DataTextField = “columnname”;
    dropdownlist.DataValueField = “id”;
    dropdownlist.DataBind();
    dropdownlist.Items.Insert(0, “Select “);

    Default Answered on January 21, 2017.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.