testing
testing

Reputation: 1796

Error: The method selectByVisibleText(string) is undefined for the type webelement

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

Answers (2)

TechDog
TechDog

Reputation: 3088

Please check the import package. It should be import org.openqa.selenium.support.ui.Select;

Upvotes: 1

Furious Duck
Furious Duck

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

Related Questions