Opening browser link from native app gets welcome to chrome page

The test scenario I am trying to handle is

  1. Launch native app
  2. Click link to web page
  3. Check the url is correct

The issue is that the first time the Chrome browser is launched, the “Welcome to Chrome” page loads. I am trying to skip that and go straight to the linked url.

Here is what I’ve tried:

I used the information from Chrome welcome window on Android 13 emulator (which is a different use case because I am starting in NATIVE_APP context and not WEBVIEW, if that is relevant) and other older forum posts to come up with this:

ChromeOptions chromeOptions = new ChromeOptions()
chromeOptions.addArguments(’–disable-fre’, ‘–no-first-run’)
capabilities.setCapability(AndroidMobileCapabilityType.CHROME_OPTIONS, chromeOptions)

That wasn’t working.

Changing that ‘AndroidMobileCapabilityType.CHROME_OPTIONS’ capability name to ‘ChromeOptions.CAPABILITY’ worked for eliminating the welcome to chrome page. However, it changed the context to CHROMIUM instead of WEBVIEW_chrome, launched chrome first instead of the native app, and generally made everything hard to manage.

What am I doing wrong if I want to start in NATIVE_APP context, open a link to chrome and skip the ‘Welcome to Chrome’ page?

The problem seems to be with Chrome itself, and not Appium. What if before you ran your automation you could take care of this problem with adb?

1 Like

Thanks @wreed! That solution worked. Including the final resolution on the post for posterity.

Combining the link you posted with information from this headspin post, I got this:

Run appium with the --relaxed-security flag.

disableWelcomeToChromeScreen() {
    List<String> args = Arrays.asList('"chrome --disable-fre --no-default-browser-check --no-first-run"',
    Map<String, Object> cmd = ImmutableMap.of('command', 'echo',
                                              'args', args)
    driver.executeScript('mobile:shell', cmd)
1 Like