How to select options from Drop-down list using selenium WebDriver||DropDown List Automation testing

Опубликовано: 16 Март 2026
на канале: Interview Insights
1,061
6

//Setting the value in the dropdown using selectByValue() method
selectByValue.selectByValue(“greenvalue”);


//Setting the value in the dropdown using selectByVisibleText() method
selectByValue.selectByVisibleText(“Lime”);


//Setting the value in the dropdown using selectByIndex() method
selectByValue.selectByIndex(“2”);