-
-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find element command extremely slow in v4.21.1 #613
Comments
Most likely this is an idling issue. You see the above wait times out after 3 seconds, which means the main UI thread is still busy. This is easy to validate if you just terminate the application under test and try to perform the lookup on any other system or third-party app control to make sure it is fast enough. |
This is the log for the internal xpath lookup performance, although it does not log how much time it takes to build the XML from the actual accessibility layer. |
right that's why I think the time is being taken here
|
What can be done to optimize this. Also for more context, this seems to be working fine on a real device but is too slow on an emulator |
would this also get affected by the UI thread being busy. Also, In that case should we not be seeing ANR errors. |
We're using appium v1.21.0 for android app testing. Intermittently we notice find element commands taking ~20 seconds. We've reduced waitForIdleTimeout and that didn't reduce the time significantly.
On debugging further through adb logcat logs
From these logs, I see the time is being taken in this part of the code
So It might be either
toStream
orSAX_BUILDER.build
functions, but I'm not able to debug any further because of no Info logs there (wasn't able to change log-level to debug either)Initially I though, since this was happening intermittently this might be a resource crunch issue, But I didn't see any such crunch while monitoring host or adb shell metrics.
This is my session create request body
The text was updated successfully, but these errors were encountered: