I used
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(60));
wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.linkText("Home"))));
But in wait.until line it throws below error when running the code.
java: method until in class org.openqa.selenium.support.ui.FluentWait cannot be applied to given types; required: java.util.function.Function<? super org.openqa.selenium.WebDriver,V> found:
org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebElement> reason: cannot infer type-variable(s) V (argument mismatch; org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebElement> cannot be converted to java.util.function.Function<? super org.openqa.selenium.WebDriver,V>)
I tried all the solutions in until in FluentWait cannot be applied - java but no avail. Thank you.