【发布时间】:2016-07-28 16:27:18
【问题描述】:
我已经阅读了所有我能找到的东西,尝试了所有我想到的东西,但我仍然坚持这个问题。因此,在混合应用程序上工作时,它具有登录屏幕(完全原生),并带有一个打开 web 视图的按钮。在我切换到 Web 视图以尝试定位元素后,appium 刹车。有没有人有类似的问题?或者有什么建议或解决方案?
下面是相关代码:
public void randomTest() throws InterruptedException{
driver.findElement(By.id("com.something.something:id/activate")).click(); //This is native part
Thread.sleep(3000);
driver.context("WEBVIEW_com.something.something"); //here it brakes (and NOT EVERY time, sometimes it passes this point, but lets say once in 10 times it passes..)
Thread.sleep(100);
//Assert.assertTrue(driver.findElement(By.className("button")).isDisplayed());
}
Appium 报告设备不可见(adb 仍然可以看到) Appium 报告了这一点(以及其他内容):
Available contexts:
[debug] ["WEBVIEW_com.something.something","WEBVIEW_com.something.something"
[debug] Available contexts:
NATIVE_APP,WEBVIEW_com.something.something,WEBVIEW_com.something.something
[debug] Connecting to chrome-backed webview
value: { message: 'unknown error: Device KR7A3P92LS is not online\n (Driver info: chromedriver=2.18.343845.......
然后在一堆其他东西之后,说:
Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device KR7A3P92LS is not online
帮助? :)
【问题讨论】: