Select from drop down using Webdriver

Select oSelection = new Select(driver.findElement(By.id("sampleID")));

    oSelection.selectByIndex(index)

    oSelection.selectByIndex(index)

    // Or

    oSelection.selectByVisibleText(text)

    oSelection.selectByVisibleText(text)

    // Or

    oSelection.selectByValue(value)

    oSelection.selectByValue(value)

No comments:

Post a Comment