My scenario is that I need to click on one button after 60 sec. Button may be displayed between 30 to 60 sec that's why I applied 60 sec.
Once I click on a button, one small page will open inside the page, in that page 'Next' button will be displayed. But after some time only that 'Next" button allow to clickable. So I used the code below and its not working at all. It is throwing the error:
Exception in thread "main" org.openqa.selenium.TimeoutException: Expected condition failed: waiting for element to be clickable: By.xpath: //a[@title='DSL Register Wizard'] (tried for 60 second(s) with 500 milliseconds interval)
The wait statement I was used is below:
WebDriverWait wait1 = new WebDriverWait(driver, 60);
wait1.until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@title='DSL Register Wizard']"))).click();
I have attached the image, in that image the 'Next' button will enabled after some time.
What is the best way to handle this situation?