Test a web page within mobile devices by using an Android Studio emulator

Originally posted by simonaferrara on August 30, 2023

Hi,

I have to test my company product, that is a web site, within the mobile devices. I’m not convinced to use the virtual browser, because the Chrome mobile compatibility mode is not realistic.

Unfortunately I’ve not got the possibility to use a physical device, so I’ve installed and configured a machine with an Android Studio emulator and Appium 1.22.3.

All the prerequisites have been installed and configured, and Test Complete can connect to the Android Studio emulator, by using the following capabilities:

The issue is that the web page is shown as a “WebView” object, that cannot be explored at all, so I cannot interact with the web page elements.

I’ve tried also with the SmartBearBrowser.apk but the result is the same and, if I’ve correctly understand, the SmartBearBrowser.apk is suggested for the usage only on real physical devices.

It seems too much strange for me that the Mobile Add-On works only in case of test implementation for mobile applications (apk), and it doesn’t work for the implementation of tests on web pages within the mobile devices.

Can someone clarify to me if it is really not feasible to reach my goal by using Test Complete?

Thanks!

Simona

Originally posted by Marsha_R on August 31, 2023

AlexKaras Have you done something similar?

Originally posted by AlexKaras on August 31, 2023

Hi,

Have you done something similar?

No, I haven’t. I tried with hybrid application and web page using CrossBrowserTesting platform (now merged with BitBar).

If BitBar is not an option, then I think that https://support.smartbear.com/testcomplete/docs/app-testing/web/supported-browsers/chrome-android.html and https://support.smartbear.com/testcomplete/docs/app-testing/mobile/device-cloud/configure-appium/index.html might inspire with some ideas (i.e. set up local Appium, make it possible to connect it to emulator and use local Appium to execute web test in TestComplete).

Originally posted by simonaferrara on September 01, 2023

AlexKaras yes, “use local Appium to execute web test in TestComplete” is exactly what I’m trying, but unfortunately it seems not possible, because the web DOM objects cannot be retrieved, the object structure tree stops at the “WebView” object, that cannot be explored (I’ve tried also with the Spy).

Originally posted by AlexKaras on September 01, 2023

Hi,

Just to be on the safe side: have you set web objects identification settings in the project properties to modern approach (via XPath/CSS selectors)?

Originally posted by simonaferrara on September 04, 2023

AlexKaras yes, I’ve got this option enabled on project properties:

simonaferrara_0-1693812371913.png