I’m getting this error message while using WebDriverWait.
It throws this error message:
The constructor WebDriverWait(WebDriver, int) is undefined
WebDriverWait wait = new WebDriverWait(driver, 10);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("above-expath")));
element.click();
What should i do instead? is it deprecated?
>Solution :
Pass a Duration instead.
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));