Appium Setup
RequirementsInstall AppiumSetting Up AndroidSetting Up iOSSetting Up An EmulatorSetting Up WindowsCompiling Your App (Native Apps)Compiling Your App (Hybrid Apps)Setup A Code Editor
MoQuality Tutorials
MoQuality Dashboard
Common Issues

Compiling Your App (Hybrid Apps)

Hybrid Apps need to be handled differently than Native Apps because Hybrid Apps contain WebViews. A WebView hides information about its nested elements. Therefore it gets challenging to fetch the required element attributes and automate WebViews. One way to work with this scenario is to set the WebViews for debugging in debug mode and use the debug version of the app for test-automation.


Setting WebViews for debugging

Appium comes with built-in hybrid support via Chromedriver, which allows the automation of any Chrome-backed Android web views. During the app build stage itself, it is necessary to set to true the setWebContentsDebuggingEnabled property on the android.webkit.WebView element. Once debugging is enabled, Appium can interact with the WebView elements in the app. Read more about configuring WebViews for debugging in the Android remote debugging docs.

Build debug version app

  1. To build a debug APK, open a command line and navigate to the root of your project directory.
  2. Initiate a debug build with gradlew assembleDebug. This creates an APK named module_name-debug.apk in project_name/module_name/build/outputs/apk/.
  3. The file is already signed with the debug key and aligned with zipalign, so you can immediately upload it.


Appium Docs - Automating Hybrid Apps