Can I automate an embedded browser inside my app?

I need to write some tests for my React-Native app able to run both on Android and iOS.
So far, I have successfully created some basic tests, I am using webdriverio together with Appium.


Now I need to write some more advanced tests covering some areas of my app where a native page would show an embedded browser. When this native page shows up, it uses a webview inside it to show a webpage with some textboxes and buttons.

These text controls and buttons do not live inside my native app, but inside the browser which is embedded inside a native page in my app.

Is it possible to automate the embedded browser somehow? Can I get to my native page and then do some kind of context switch in there to get a hold on the embedded browser?

yes. this is called hybrid app. better switch to webview to interact with such screens.
step 1: check that webview is debuggable. e.g. with iOS you should be able see webview of your app with Safari browser on mac. phone connected to mac. any problem -> go to developers and ask to make webview debugabble.
step 2: on such screen switch context to web (check forum how to switch :slight_smile: ). now you can use full power of web with same e.g. CSS locator search and so on. just like you testing web.

Thanks @Aleksei I will try that. At least now I know this can happen :slight_smile: