I am currently testing an application that should be set as the default launcher.
I already have a set of Espresso
tests running, but they only work if the user has previously selected my app as the launcher.
The dialog that appears to the user so that he can select the launcher is not reachable by Espresso
, since it is outside the app itself. However, UIAutomator
would be perfectly able to interact with it.
Hence, I would like to know if it is possible to use some kind of UIAutomator
script before the Espresso
tests.
Since UIAutomator 2.0
is now based on Android Instrumentation, you can run Espresso
and UIAutomator
tests in one test suite, for example. You can play with test methods naming to run UIAutomator tests first and then run other Espresso stuff. More about UIAutomator 2.0 and how to use it together with Espresso here.
I have no experience yet with uiatomator
, but I can provide you some useful links to start. Here they are:
uiautomator
visit these site:Espresso
with uiatomator
visit:https://testyour.app/blog/espresso-uiautomator
Hope it help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With