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.

Appium 1.6.3 - Test hungs - Wait Polling not working

See original GitHub issue

The problem

I type a word in a search. This made a loader to appear. In my next step I am trying to tap a second a element. This leads Appium to make a POST. There I have expected conditions that keeps polling. While in prior versions my expected conditions worked just fine and polling was working in Appium 1.6.3 it hungs and the whole test stops at the point of the first POST request. If I put a static sleep that warranties loader has finished then test continues fine.

Environment

  • Appium version (or git revision) that exhibits the issue: Appium 1.6.3
  • Last Appium version that did not exhibit the issue (if applicable): 1.6.0
  • Desktop OS/version used to run Appium: MacOS
  • Mobile platform/version under test: iOS 10.2 (XCUITest)
  • Real device or emulator/simulator: Real and Emulator

Link to Appium logs

[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/83971C74-37C4-4020-9738-787B00269351/element] with body: {"using":"xpath","value":"//XCUIElementTypeStaticText[@name='Dev Ops']/../following-sibling::XCUIElementTypeCell"}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
mykola-mokhnachcommented, Dec 29, 2016

It must be this WDA issue: https://github.com/facebook/WebDriverAgent/issues/372

Try to use non-xpath locator as a workaround or apply visibility patch I mentioned in that WDA issue to your local WDA source

2reactions
ohadschncommented, Jan 24, 2017

For the benefit of Googlers who get here (as I did), I’ll sum up mykola-mokhnach’s workaround from the other issue:

  1. Assuming you installed appium globally (npm install appium -g), open /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m with your favorite text editor.
  2. Replace the content of XCElementSnapshot’s (BOOL)fb_isVisible method with the following: return !CGRectIsEmpty(self.frame) && !CGRectIsEmpty(self.visibleFrame) && (CGRectIntersectsRect(self.visibleFrame, self.application.frame) || ((self.application.interfaceOrientation == UIInterfaceOrientationLandscapeLeft || self.application.interfaceOrientation == UIInterfaceOrientationLandscapeRight) && self.application.frame.size.height > self.application.frame.size.width && CGRectIntersectsRect(self.visibleFrame, CGRectMake(0, 0, self.application.frame.size.height, self.application.frame.size.width))));
Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with Waits after upgrading to Appium 1.6.3 - Support
I finally upgraded from Appium 1.5.3 to 1.6.3 so I can test on iOS 10, and I believe that I have everything configured...
Read more >
Troubleshooting - Appium
Make sure developer mode is on · Make sure command prompt is Admin · Check that the URL Appium server is listening to...
Read more >
Implicit Wait - Appium
When searching for a single element, the driver should poll the page until an element is found or the timeout expires, whichever occurs...
Read more >
Getting error while executing the swipe in 1.6.3 after that ...
Hi Team, IOS-10 appium-1.6.3 using real device. I am using driver.swipe(x,y,x,y,d); while executing this step, it is taking 4 minutes time after 4...
Read more >
Wait for element to disappear/ not be preset anymore
I'm trying to tell appium to wait until the element is not visible and them continue with the test. Here are my samples:...
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