2016-11-18 78 views
3

初始化机器人驱动器虽然initilizing中制造sessionNotCreatedException模拟器设备机器人驱动程序。是Android自动化的新功能。任何人都请帮忙?org.openqa.selenium.SessionNotCreatedException:无法创建新的远程会话。而在仿真器

2016年11月18日下午5时35分25秒org.openqa.selenium.remote.ProtocolHandshake了createSession 信息:试图双向方言会话,假设Postel的法律持有远端 真正的2016年11月18日5:35 :25 PM org.openqa.selenium.remote.ProtocolHandshake createSession 信息:回落到直线W3C远程端连接 2016年11月18日下午5:35:25 org.openqa.selenium.remote.ProtocolHandshake createSession 信息:回落到原始的OSS JSON有线协议。 org.openqa.selenium.remote.UnreachableBrowserException:无法启动新的会话。可能的原因是远程服务器的地址无效或浏览器启动失败。 生成信息:版本: '未知',修订版: 'c7b525d',时间: '2016年9月1日14点52分三十秒-0700' 系统信息:主机: 'thangaraj',IP: '127.0.1.1', os.name:'Linux的,os.arch: 'AMD64',os.version: '3.19.0-25泛型',java.version: '1.8.0_101' 驱动程序信息:driver.version:AndroidDriver 在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:618) 在io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40) 在io.appium.java_client.AppiumDriver.execute(AppiumDriver。 java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242) at org.openqa。 selenium.remo te.RemoteWebDriver。(RemoteWebDriver.java:129) 在org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:142) 在io.appium.java_client.DefaultGenericMobileDriver。(DefaultGenericMobileDriver.java:36) 在IO .appium.java_client.AppiumDriver。(AppiumDriver.java:114) 在io.appium.java_client.AppiumDriver。(AppiumDriver.java:132) 在io.appium.java_client.android.AndroidDriver。(AndroidDriver.java:92) 在initialize.Setup.initialize(Setup.java:230) 在script.ScriptRunner.setup(ScriptRunner.java:67) 在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法) 在sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.Delegating MethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:498) 在org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100) 的组织。 testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:515) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:216) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:143) 在org.testng.SuiteRunner.privateRun(SuiteRunner.java:307) 在org.testng.SuiteRunner.run(SuiteRunner.java:270) 在org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) 在org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at或g.testng.TestNG.runSuitesSequentially(TestNG.java:1284) 在org.testng.TestNG.runSuitesLocally(TestNG.java:1209) 在org.testng.TestNG.runSuites(TestNG.java:1124) 在有机testng.TestNG.run(TestNG.java:1096) at runTestNG.RunTestng.runTestNG(RunTestng.java:19) at runner.Runner.main(Runner.java:11)​​ 由org.openqa.selenium引起。 SessionNotCreatedException:无法创建新的远程会话。期望的能力=能力[{app =/home/ionixx/Android/Sdk/platform-tools/xxxxxxxxxxxxxxx。apk,appPackage = xxxxxxxxxxxxxxxxxx,appActivity = xxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx,noReset = true,browserName =,maxSession = 10,platformName = Android,version = 4.4,deviceName = Nexus1}],必需的能力= null 构建信息:version:'unknown' ,修改:'c7b525d',时间:'2016-09-01 14:52:30 -0700' 系统信息:host:'thangaraj',ip:'127.0.1.1',os.name:'Linux',os .arch:'amd64',os.version:'3.19.0-25-generic',java.version:'1.8.0_101' 驱动程序信息:driver.version:AndroidDriver at org.openqa.selenium.remote.ProtocolHandshake .createSession(ProtocolHandshake.java:80) 在org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141) 在io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:69) 在org.openqa .selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:597)

回答

0

请检查包含selenium 2.53.1 source和2.53.1 jar的包。并在提取硒2.53.1后包含lib文件夹中的所有jar文件。 -use testng.xml文件设置测试用例的流程。

作者:Imran Ansari,我的同事。

0

我只需更改应用程序路径

capabilities.setCapability("app", <<apk file path>>); 
0

改变的是正确应用程序的路径(APK路径)后工作解决了这个问题。

相关问题