0

I use below xml to run the test case, it always get exception on this step:

DeviceUtils.getQAFDriver().get("https://www.google.com");

Exception:: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error attempting to start URI. Original error: Error: Error executing adbExec. Original error: 'Command 'D:\Android\SDK\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -a android.intent.action.VIEW -d https://www.baidu.com com.android.chrome' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'adbExecTimeout' capability


        <parameter name="driver.capabilities.deviceName" value="emulator-5554"/>
        <parameter name="driver.capabilities.automationName" value="UiAutomator2"/>
        <parameter name="driver.capabilities.appPackage" value="com.android.chrome"/>
        <parameter name="driver.capabilities.appActivity" value="com.google.android.apps.chrome.Main"/>
        <parameter name="driver.capabilities.noReset" value="true"/>
        <parameter name="appium.capabilities.driverClass" value="io.appium.java_client.android.AndroidDriver"/>```
Ken White
  • 123,280
  • 14
  • 225
  • 444
Moon
  • 137
  • 1
  • 7
  • From the error it looks appium error in starting emulator. – iscj Apr 30 '20 at 04:48
  • But the Android chrome app is launched and the website also opened. And in my another project, I launched an app, it can be operated correctly, then when I open a link from this app, it's open in android chrome, it's also work well. – Moon Apr 30 '20 at 05:38

1 Answers1

0

Refer Android mobile web automation and set capabilities for browser automation instead of considering chrome native app. Alernate is after opening chrome as native app switch to webview and then try driver.get() but it is not recommend.

iscj
  • 132
  • 7
  • Solved,I fell into the wrong mindset, this exception is caused by that I use the Android Chrome as a desktop Chrome, so I use the driver.get to visit the website. Just control the Android Chrome as a normal android app, enter the website in the search input, then all goes well. – Moon Apr 30 '20 at 08:57