Hi I'm very new to selenium and was wondering how it would be best to wait for an element to become enabled. I'm writing a test to download a report that requires a status to be set at "Complete" within a table before a download button appears. I have tried to use the isDisplayed() function but so far it fails. I also need the timer to be dynamic to keep checking until the report is completed before downloading.
public static boolean isElementVisible(WebElement element) throws Exception {
return element.isDisplayed();
}
public void statusCheck() throws Exception {
if(Utils.isElementVisible(status)){
downloadButton.click();
}
else{
wait(100000);
}
}