-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Driving out of app areas #359
Comments
Yeah this is a limitation of Espresso. Espresso only tests the 'app-under-test', which has pro's and con's. UiAutomator2 can test external apps. I think what we should be doing is merging our UiAutomator2 driver into Espresso and having the ability to change native contexts. |
It definitely makes sense to merge both given they have mutually exclusive powers. Is it a plan in near future? |
Not sure how soon we'll get to it. Depends on if we can have somebody work on it. |
@dpgraham as a stop-gap, do you think its a good idea to add a mobile command which can evaluate a uiautomator2 script to workaround this problem? I can try doing that |
@rajdeepv Yeah if you wanted to work on that, I'm fine with that. |
Lovely. > #359 (comment) |
@dpgraham @KazuCocoa, What I meant was not a fully fledged script parser, but just a workaround which helps me in very rare cases when I want to click or get the text/contentDescription etc from out of app areas. I already use the simple workaround from my fork for my personal projects. Not sure if it is good enough for upstream. |
@rajdeepv create a PR. We'll be happy to review as always. |
There are cases where we have to drive out of app areas. Example:
AppUnderTest (has an upload photo button which opens Android Gallery)=> Select photos => Back to AppUnderTest
AppUnderTest => Open GooglePlay payment flow => Pay using GooglePlay => Back to AppUnderTest
espresso-driver already has InteractionHelper with UiDevice and therefore there is a possibility of driving out of app areas. It can possibly be a simple mobile command to which we give uiautomator2 script to execute (similar to https://github.com/appium/appium-uiautomator2-server/blob/ce4b766cf702e9d0b8b2304b06a8fd00aaff8fd6/app/src/main/java/io/appium/uiautomator2/utils/UiAutomatorParser.java)
The text was updated successfully, but these errors were encountered: