首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在appium程序中将错误显示为重新安装所需的"app“选项

在appium程序中将错误显示为重新安装所需的"app“选项
EN

Stack Overflow用户
提问于 2019-03-08 11:10:05
回答 1查看 7.5K关注 0票数 1

在运行appium程序时,我得到了异常。请询问是否需要额外的信息。

TLDR:

原始错误:重新安装需要“app”选项

Log4j:没有为记录器(org.apache.http.client.protocol.RequestAddCookies).找到任何附加程序log4j :警告请正确初始化log4j系统。Log4j:警告参见http://logging.apache.org/log4j/1.2/faq.html#noconfig以获得更多信息。线程"main“org.openqa.selenium.WebDriverException中的异常:在处理命令时发生了一个未知的服务器端错误。原始错误:重新安装构建信息需要“app”选项:版本:'3.8.1',修订版:'6e95a6684b',时间:'2017-12-01T19:05:14.666Z‘系统信息: os.name:'Windows 7',os.arch:’amd64 64‘,os.version:'6.1',java.version:'1.8.0_151’驱动程序信息: driver.version: AndroidDriver远程堆栈跟踪: UnknownError:处理命令时发生了一个未知的服务器端错误。原始错误:在(C:\Users\preethi.g\AppData\Local\appium-desktop\app-1.10.0\resources\app\node_modules\appium-base-driver\lib\protocol\errors.js:826:9) at asyncHandler (C:\Users\preethi.g\AppData\Local\appium-desktop\app-1.10.0\resources\app\node_modules\appium-base-driver\lib\protocol\protocol的getResponseForW3CError上重新安装“app”选项是必需的( sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native方法:68:7),在sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown源),在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown源),在java.lang.reflect.Constructor.newInstance(Unknown源),在org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57) ( org.openqa.selenium ).remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source) at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source) at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)( util.stream.AbstractPipeline.wrapAndCopyInto(Unknown来源)在java.util.stream.FindOps$FindOp.evaluateSequential(Unknown来源)在java.util.stream.AbstractPipeline.evaluate(Unknown源头)在java.util.stream.ReferencePipeline.findFirst(Unknown源头)在org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) atorg.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:83) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:93) at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:72)在Mobileapp1.Apptesting.main(Apptesting.java:24)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-03-08 11:44:43

似乎您没有在DesiredCapability中添加"app“功能,并且正在使用noReset功能。您可以添加"app“功能,并给出.ipa或.apk文件的位置。

代码语言:javascript
复制
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(MobileCapabilityType.APP, "path to ipa/apk file" );
//others capabilities
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55061977

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档