Issue
Is it possible to By search for an id, for example an id of a button?
I want to have my Ui Device wait until the button is visible. Currently I have
UiDevice.wait(Until.findObject(By.text("Text on Button")), wait_time).action();
But searching by text seems to be inconsistent between devices, not sure why. I wanted to test searching by object id since that seems like it would be more consistent.
Solution
This should work:
UiDevice.wait(Until.findObject(By.res("com.example.app:id/button")), wait_time).action();
Answered By - Diego Torres Milano
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.