测试今日头条 apk 时,打开之后秒退,别的像 QQ,网易云音乐都没有出现此现象 日志和报错已贴上,尚未弄懂怎么回事,请指教
代码如下:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "7.0");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "fc86ccdd");
capabilities.setCapability(MobileCapabilityType.APP, "D:\eclipse\apps\toutiao.apk");
capabilities.setCapability("noReset", true); //不需要再次安装
capabilities.setCapability("unicodeKeyboard", "True");//支持中文输入,会自动安装 Unicode 输入法。默认值为 false
capabilities.setCapability("resetKeyboard", "True");
capabilities.setCapability("newCommandTimeout", 30*1000);
URL url = new URL("http://127.0.0.1:4723/wd/hub");
AndroidDriver driver = new AndroidDriver(url, capabilities);
报错如下:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error occured while starting App. Original error: com.ss.android.article.news.activity.SplashBadgeActivity or com.ss.android.article.news.com.ss.android.article.news.activity.SplashBadgeActivity never started (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 52.05 seconds