Can i switch between drivers during execution?

Hi all,

I am trying to automate a react native app in Android.The app on lauch opens a login screen in web browser and after successful authentication it redirects the user to the app.

Since uiautomator does not provide support for testID i am planning to go with espresso driver. But the issue is i am not able to interact with the elements in the web browser when i use espresso driver. I understand that it is a limitation of espresso that it cannot work outside the application sandbox so i am thinking if i can use both uiautomator and espresso driver in this scenario or if there is any workaround for this?

Any help would be appreciated. Been struck with this for a long time. Thanks

I don’t think it would be possible to deploy both drivers on the same device, but I’ve never tried that. Btw, Espresso driver is capable to use a limited set of UIA commands via mobile: uiautomator helper.

Thanks for the quick reply @mykola-mokhnach. Can you please explain me more on “UIA commands via mobile: uiautomator helper” is it a capability that should be used along with espresso driver?

http://appium.io/docs/en/commands/mobile-command/