We have more than 400 UI tests written using espresso running locally in Android Studio and remotely on continuous integration system.
Some of these tests check if the mobile application opens an http url with Chrome. In our test suite we verify if chrome is running using the following method:
fun waitChrome(device: UiDevice): UiObject2? {
return device.wait(Until.findObject(By.pkg("com.android.chrome")), 2500)
}
Last week,maybe an update of gradle depencencies causes test failures. Chrome is not opened anymore during the execution of these tests. In order to fix these failures I changed the implementation of the above method:
fun waitChrome(device: UiDevice): UiObject2? {
return device.wait(Until.findObject(By.pkg("org.chromium.webview_shell")), 2500)
}
A System WebView Shell is launched instead of Chrome App on Continuous Integration System.
I would like to know it there is a way to restore the usage of Chrome during the execution of these tests. Maybe some parameter can be passed when the emulator starts.