0

I need help on wait function in Selenium webdriver.
I have the following code to wait for "Progressing Pop up" to disappear. It seems it waits only for some seconds and terminates the script. Please let me know what are the other option?

public static void ProcessingData() throws Exception {
    WebDriverWait wait1 = new WebDriverWait( driver , 180 ); 


    wait1.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath("//div[@class='dijitDialogPaneContent']/div/p/b[contains(text()='Processing ...']")));
}
3
  • If one of the answers was the solution to your problem, please mark this as complete! :) Commented Jan 12, 2013 at 3:26
  • None of these answers are solution for this problem. Commented Jan 15, 2013 at 5:08
  • if none of the answers below solve your problem, could you show the html? this could help us. Commented Feb 7, 2014 at 14:40

2 Answers 2

1

You placed your timeout on 180, which is 180 milliseconds. You probably mean 180 seconds? So use 180000.

Sign up to request clarification or add additional context in comments.

1 Comment

As per the method signature, it takes seconds. Check in the below link: link seleniumhq.org/docs/04_webdriver_advanced.jsp Method signature is: WebDriverWait wait2 = new WebDriverWait(driver, timeOutInSeconds)
1

I'd take a closer look at your xpath selector... you are providing

...b[contains(text()='Processing ...']

If you know that the text is equal to processing, then you should use

...b[text()='Processing ...'].

If you know that the text CONTAINS Processing ... then you should use,

...b[contains(text(), 'Processing ...']

1 Comment

according to above, I changed to ...b[text()='Processing ...'], still not working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.