|
Post by ummayashri on May 29, 2018 12:35:09 GMT
The value in the dropdown can be selected using WebDriver’s Select class. Syntax: selectByValue: Select selectByValue = new Select(driver.findElement(By.id(“SelectID_One”))); selectByValue.selectByValue(“greenvalue”); selectByVisibleText: Select selectByVisibleText = new Select (driver.findElement(By.id(“SelectID_Two”))); selectByVisibleText.selectByVisibleText(“Lime”); selectByIndex: Select selectByIndex = new Select(driver.findElement(By.id(“SelectID_Three”))); selectByIndex.selectByIndex(2); Selenium Training In Bangalore | Best Selenium Training in Bangalore
|
|