Snippet for Selecting Value from Drop Down
1.)Select selectData=new Select(element);
selectData.deselectAll();
selectData.selectByValue("Education Organization");
Select selectsec_ques1 = new Select(sec_ques1);
selectsec_ques1.selectByValue("What is your Pet's name?");
Example"
<option value = "MD">MD</option>
<option value="prog">Programmer</option>
dropdown.selectByVisibleText("Programmer ");
or
dropdown.selectByIndex(1);
or
dropdown.selectByValue("prog")
No comments:
Post a Comment