selenium - I am getting error "The method timeouts() is undefined for the type WebDriver.Options" -
i using implicit wait below:
//import import org.openqa.selenium.webdriver; //driver declaration public static webdriver driver = null; //implicit wait driver.manage().timeouts().implicitlywait(30, timeunit.seconds); having error below:
the method timeouts() undefined type webdriver.options need resolve this.
nice catch. seems me bug selenium jars
here answer question:
as of code have 2 lines. first line public static webdriver driver = null; shows no error have imported org.openqa.selenium.webdriver;
in second line , providing implicit wait in driver.manage().timeouts().implicitlywait(30, timeunit.seconds);. in case ide on working tries resolve method timeouts() org.openqa.selenium.webdriver have imported. hence no error should have been shown timeouts() method.
hence following error not justified:
the method timeouts() undefined type webdriver.options the error should have been shown either implicitlywait() method or parameter timeunit.
now, actual error parameter timeunit passed within implicitlywait() method. ide suggests importing java.util.concurrent.
solution:
the solution import java.util.concurrent.timeunit; , code error free follows:
import java.util.concurrent.timeunit; let me know if answers question.


Comments
Post a Comment