facebookarchive / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
4.15k stars 1.38k forks source link

WebDriverAgent function getPageSource hangs for over a minute #984

Open donioe opened 6 years ago

donioe commented 6 years ago

The problem

WebDriverAgent function getPageSource hangs for 65 seconds at a time due to an error in XCElementSnapshot.hitTest. This prevents using the WDA method "/source".

Environment

Details

The current implementation of WebDriverAgent method XCUIElement+FBIsVisible.fb_isVisible uses the XCTest method XCElementSnapshot.hitTest which sometimes hangs for over a minute. Commenting out the line which uses this method solves the problem.

Link to Appium logs

https://gist.github.com/donioe/dd362d927811e37193823c5710347a41

Code To Reproduce Issue [ Good To Have ]

Reproduces immediately with almost any app (even iOS SpringBoard):

  1. Run WebDriverAgent when device is connected.
  2. Open http://serverurl:8100/source
  3. Wait until the response arrives.
donioe commented 6 years ago

Any news regard this?

marekcirkos commented 6 years ago

This is known to be slow, unfortunately there is no workaround yet.

NijaCN commented 5 years ago

This problem still exist!