The test scenario I am trying to handle is
- Launch native app
- Click link to web page
- 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?