question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wait until method does not throw exception after timeout

See original GitHub issue

Hi! I’m using explicit waits for android app automation with Appium like this:

WebDriverWait wait = new WebDriverWait(driver,15);

wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(idPrefix + buttonId)));

But for some reason after 15 seconds no exception is thrown and the test run is basically still stuck waiting for the element.

The appium logs sometimes print [base driver] Waiting up to 5000000 ms for condition but I really have no idea where this number is coming from.

I’m using appium server v1.13.0 with caps.setCapability(“automationName”, “UiAutomator2"); for android

Any help is greatly appreciated!

Environment

  • java version “1.8.0_181” Java™ SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)
  • appium server v1.13.0
  • MacOS Mojave
  • Node.js version v10.16.3
  • Android 6.0.1
  • Samsung Galaxy S5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
imurchiecommented, Sep 11, 2019

Check if you are setting the implicit wait timeout somewhere.

0reactions
pokeahontascommented, Sep 12, 2019

Ok sorry guys, I found the issue, it actually was a hidden implicit wait of 5000 seconds. Thanks for the quick help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wait until method does not throw exception after timeout
If you don't want for the exception to be thrown if there is no element, try using such method to check element for...
Read more >
Wait until method does not throw exception after timeout
I'm using explicit waits for android app automation with Appium like this: WebDriverWait wait = new WebDriverWait(driver,15);.
Read more >
TimeOutException in Selenium - Educative.io
In Selenium, TimeOut exception occurs when a command takes longer than the wait time to avoid the ElementNotVisible Exception. If the commands do...
Read more >
Waits - Selenium
If the condition fails, e.g. a truthful return value from the condition is never reached, the wait will throw/raise an error/exception called a...
Read more >
Java.lang.Object.wait(long timeout) Method - Tutorialspoint
Object.wait(long timeout) causes current thread to wait until either another ... status of the current thread is cleared when this exception is thrown....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found