You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to automate testing of an android application.
Everything was working fine until the developers added a text field to one screen that is updating every 100ms.
With that field visible on the screen, even a simple device(resourceId="<object_id_str>").exists
request takes at least 2-3 times longer to complete (if the updating text field is present on the screen)....7s vs 17s .
And if I am checking for the existence of multiple items, then the time increases exponentially,
in fact, I've seen it take over 2 mins to complete or JASONRPC times out while trying to handle it.
Has anyone else run into this issue?
I cannot be the first person to have a constantly updating text field on the screen.
How can I get around this as it is completely breaking my existing automation. :(
The text was updated successfully, but these errors were encountered:
brettnolan
changed the title
JSONRPC calls timing out or taking a LONG time to complete if I have a field on screen with constantly updating text
'.exists' calls timing out or taking a LONG time to complete if I have a field on screen with constantly updating text
Mar 25, 2024
Try using more efficient wait strategies that are less impacted by rapidly changing content.
Explicit Waits: Instead of checking for existence alone, wait for specific conditions or stable states. This can help if you can identify when the page or element is stable.
# Example: Wait for a stable element to indicate the state is stabledevice(resourceId="some_stable_element_id").wait.exists(timeout=10000)
2. Profiling and Debugging
Use profiling tools, such as Android Profiler, to diagnose performance bottlenecks. These tools can help you determine if the issue is related to the updating field or another factor.
Summary
The constant updating of the text field is likely causing performance issues in your automated tests with UIAutomator. By optimizing wait strategies, excluding irrelevant elements, and improving test design, you should be able to mitigate the impact and enhance your test performance.
I am trying to automate testing of an android application.
Everything was working fine until the developers added a text field to one screen that is updating every 100ms.
With that field visible on the screen, even a simple
device(resourceId="<object_id_str>").exists
request takes at least 2-3 times longer to complete (if the updating text field is present on the screen)....7s vs 17s .
And if I am checking for the existence of multiple items, then the time increases exponentially,
in fact, I've seen it take over 2 mins to complete or JASONRPC times out while trying to handle it.
Has anyone else run into this issue?
I cannot be the first person to have a constantly updating text field on the screen.
How can I get around this as it is completely breaking my existing automation. :(
The text was updated successfully, but these errors were encountered: