[Appium][Android] Chrome Custom Tab

A note about chrome custom tab when I tested in appium#13543

Demo apps in https://github.com/GoogleChrome/android-browser-helper helped me to check basic chrome custom tabs availability via Appium. Some apps may have custom chrome tabs. Then, I assume it requires setting chrome options properly.

My test environment had Appium 1.21.0 or newer, so possibly older ones had issues to handle chrome processes.

How to check

  1. Git clone the android-browser-helper repository
  2. Gradle build a demo app
  3. Get the app’s path, the package name (e.g. org.chromium.customtabsdemos) and the activity name (e.g. .DemoListActivity)
  4. Run Appium with these app path and package names

Tips

  1. The device requires developer options to enable USB debug feature for a chrome browser
    • An emulator must have developer options enabled to get the chrome browser’s data. Without the option, chrome://inspect does not provide chrome’s tab data. It means Appium also cannot get them.
  2. In some cases, chrome option to specify the target package name like "chromeOptions": { "androidPackage": "com.android.beta" }
  3. appium:enableWebviewDetailsCollection: true capability may help in some environments

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.