我已经给了以下编码来启动android设备。运行时,它指向Android设备,它在Android设备中创建Android驱动程序应用程序,之后它会抛出以下错误消息。
WebDriver driver = new RemoteWebDriver(DesiredCapabilities.android());
driver.get("url");
错误讯息:
Failed tests: setUp(mobileweb.photocentric.ScrollArticleTest): Could not start the app under test using instrumentation.
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{io.selendroid.io.selendroid.androiddriver/io.selendroid.server.ServerInstrumentation}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.io.selendroid.androiddriver/io.selendroid.server.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:301)
at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:2)
我遇到了同样的问题,我发现androiddriver包与我设备上安装的先前版本有冲突。
尝试使用以下命令从设备卸载软件包:
adb shell pm uninstall io.selendroid.io.selendroid.androiddriver