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(ExpectedConditions.visibilityOf(elementName)) related issue

See original GitHub issue

Description

I’ve below code

WebDriverWait wait = new WebDriverWait(AppiumController.instance.driver, timeout); wait.until(ExpectedConditions.visibilityOf(elementName));

Here I pass timeout value but observed that instead of waiting for timeout value, it waits for default time mentioned in

PageFactory.initElements(new AppiumFieldDecorator(driver, 30, TimeUnit.SECONDS), this);

Environment

  • java client build version or git revision if you use some shapshot: 5.0.0-BETA3
  • Appium server version or git revision if you use some shapshot: 1.6.3
  • Desktop OS/version used to run Appium if necessary: Mac
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe:
  • Mobile platform/version under test: iOS 10.2
  • Real device or emulator/simulator: simulator

Details

  1. When I set wait , I expect element to wait for that time interval itself.
  2. But value set for wait is ignored and element waits for default timeout mentioned in PageFactory.initElements
  3. Later I tried @WithTimeout(time = 3, unit = TimeUnit.SECONDS) for this element but still it waits for defaulttime, my understanding is this particular tag overrides the default time.

Code To Reproduce Issue [ Good To Have ]

NA

Ecxeption stacktraces

NA

Link to Appium logs

https://gist.github.com/vikramvi/2eedd0643f89140fa3d6ffac8f347644

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:27 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
TikhomirovSergeycommented, Mar 1, 2017

@vikramvi I am closing this ticke as @WithTimeOut works as expected. Please reopen it if there are some details.

1reaction
TikhomirovSergeycommented, Feb 25, 2017

@vikramvi The fix is merged and will be published at BETA4. Please take a look at the PR and close the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - wait.until(ExpectedConditions.visibilityOf Element1 OR ...
xpath("...")).getText();. To sum up, I need to wait until either of the TWO elements shows up. Then pick whoever shows up (they cannot ......
Read more >
Understanding ExpectedConditions in Selenium - BrowserStack
An explicit wait can be applied to the condition that tries to find the web element in question. If the condition finds the...
Read more >
What Is ExpectedConditions In Selenium (With Examples)
In the above snippet demonstrating expected conditions in Selenium Java, the Selenium WebDriver waits for a maximum duration of 10 seconds until ...
Read more >
Use the Selenium Wait functions - Perfecto Help
The ExpectedConditions class provides static methods that can check for the following conditions of different UI Elements: Selected. Clickable. Visible.
Read more >
WebDriver Waits Examples - Selenium Easy
WebDriverWait wait = new WebDriverWait(driver, waitTime); wait..until(ExpectedConditions.visibilityOf(element));. We can also use the below to check all ...
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