I am using a method for seleniumRC driver.select(selectLocator, Optionvalue) How to replace it in selenium web driver?

有帮助吗?

解决方案

In webdriver you can use following:

new Select(driver.findElement(By.*locator*("*value*"))).selectByVisibleText("text");

Here selectBy also has various methods like selectByIndex, selectByValue.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top