[英]Original error: io.appium.uiautomator2.common.exceptions.UiAutomator2Exception
Log error: 记录错误:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: io.appium.uiautomator2.common.exceptions.UiAutomator2Exception: java.lang.IllegalStateException: UiAutomation not connected!
at io.appium.uiautomator2.utils.UiExpressionParser.invokeMethod(UiExpressionParser.java:251)
at io.appium.uiautomator2.utils.UiScrollableParser.consumeMethodCall(UiScrollableParser.java:124)
at io.appium.uiautomator2.utils.UiScrollableParser.parse(UiScrollableParser.java:60)
at io.appium.uiautomator2.utils.UiAutomatorParser.consumeStatement(UiAutomatorParser.java:93)
at io.appium.uiautomator2.utils.UiAutomatorParser.parse(UiAutomatorParser.java:49)
at io.appium.uiautomator2.utils.LocationHelpers.toSelectors(LocationHelpers.java:95)
at io.appium.uiautomator2.utils.LocationHelpers.toSelector(LocationHelpers.java:88)
at io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:144)
at io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:75)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:37)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:250)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:241)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
* **Element info: * **元素信息:
{Using=-android uiautomator, value=new UiScrollable(new UiSelector()).scrollIntoView(new UiSelector().text(" val "));}
Appium Log: Appium日志:
restarting adb
before the test run with adb kill-server; adb start-server
在使用
adb kill-server; adb start-server
运行测试之前重新启动adb
adb kill-server; adb start-server
adb kill-server; adb start-server
. adb kill-server; adb start-server
。 because sometimes the appium
server having issue with adb so by restarting you can avoid this problem not every time when this error comes you can again start executing if not solved then please restart adb
and then start executing script that will work.. Happy to help... In case you have any doubts comment down below.. 因为有时
appium
服务器出现adb问题,所以通过重新启动可以避免此问题,并非每次出现此错误时都可以,如果未解决,您可以再次开始执行,请重新启动adb
,然后开始执行将起作用的脚本。 ..如果您有任何疑问,请在下面写下。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.