Reputation: 1796
while adding
WebElement dBox1= (new WebDriverWait(driver,10))
.until(ExpectedConditions.elementToBeClickable(By.id("visualizationId")))
.selectbyVisibleText("Center");
in my code am getting the error The method selectByVisibleText(string)
is undefined for the type webelement
Upvotes: 0
Views: 2454
Reputation: 3088
Please check the import package. It should be import org.openqa.selenium.support.ui.Select;
Upvotes: 1
Reputation: 2019
It is the programming issue. elementToBeClickable
Expected condition returns the webelement object which doesn't have selectByVisibleText(string)
method. This method belongs to Select
class. Read here
Upvotes: 1