2016-11-18 27 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路徑)後工作解決了這個問題。

相關問題