I'm new in selenium Java, can anybody help and give me a simple example how to create a wait.until java command? Please correct my code if wrong thank you
import org.openqa.selenium.support.ui.WebDriverWait;
//lines of code
WebDriverWait waitVar = new WebDriverWait (driver, 1000);
waitVar.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"btnDraftReports\"]"))).click();
or should i use this ?
waitVar.until(ExpectedConditions.elementToBeClickable(By.id("btnDraftReports"))).click();
Thank you and more power