简体   繁体   English

org.openqa.selenium.SessionNotCreatedException:无法创建新的远程会话。 在模拟器中初始化android驱动程序

[英]org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. while initializing android driver in emulator

While initilizing android driver in emulator device produced sessionNotCreatedException. 在模拟器设备中初始化android驱动程序时产生了sessionNotCreatedException。 Am new for android automation. 我是Android自动化的新手。 Anyone please help?. 有人请帮忙吗?

Nov 18, 2016 5:35:25 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end Nov 18, 2016 5:35:25 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Falling back to straight W3C remote end connection Nov 18, 2016 5:35:25 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Falling back to original OSS JSON Wire Protocol. 2016年11月18日下午5:35:25 org.openqa.selenium.remote.ProtocolHandshake createSession INFO:尝试双方言会议,假设Postel定律适用于远程端2016年11月18日下午5:35:25 org.openqa .selenium.remote.ProtocolHandshake createSession INFO:回归直接W3C远程终端连接2016年11月18日下午5:35:25 org.openqa.selenium.remote.ProtocolHandshake createSession INFO:回归原始的OSS JSON Wire协议。 org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. org.openqa.selenium.remote.UnreachableBrowserException:无法启动新会话。 Possible causes are invalid address of the remote server or browser start-up failure. 可能的原因是远程服务器的无效地址或浏览器启动失败。 Build info: version: 'unknown', revision: 'c7b525d', time: '2016-09-01 14:52:30 -0700' System info: 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 info: driver.version: AndroidDriver at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:618) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40) at 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.remote.RemoteWebDriver.(RemoteWebDriver.java:129) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:36) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114) at io.appium.java_client 构建信息:版本:'未知',修订版:'c7b525d',时间:'2016-09-01 14:52:30 -0700'系统信息:主机:'thangaraj',ip:'127.0.1.1',os。名称:'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.RemoteWebDriver.execute(RemoteWebDriver.java:618)at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)at io .appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)at org.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver。 java:129)atg.openqa.selenium.remote.RemoteWebDriver。(RemoteWebDriver.java:142)at io.appium.java_client.DefaultGenericMobileDriver。(DefaultGenericMobileDriver.java:36)at io.appium.java_client.AppiumDriver。(AppiumDriver。 java:114)at io.appium.java_client .AppiumDriver.(AppiumDriver.java:132) at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:92) at initialize.Setup.initialize(Setup.java:230) at script.ScriptRunner.setup(ScriptRunner.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100) at org.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) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:307) at org.testng.SuiteRunner.run(SuiteRunner.java:270) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRun .AppiumDriver。(AppiumDriver.java:132)ato.appium.java_client.android.AndroidDriver。(AndroidDriver.java:92)at initialize.Setup.initialize(Setup.java:230)at script.ScriptRunner.setup(ScriptRunner。 java:67)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang位于org.test.invoke.invokeMethod(MethodInvocationHelper.java:100)org.test.invoke.invokeConfigurationMethod(Invoker.java:515)的org.test.invoke(Method.java:498).reflect.Method.invoke(Method.java:498)。在org.testng的org.testng.SuiteRunner.privateRun(SuiteRunner.java:307)的org.testng.internal.Invoker.invokeConfigurations(Invoker.java:143)上的testng.internal.Invoker.invokeConfigurations(Invoker.java:216) .OiteRunner.run(SuiteRunner.java:270)org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)org.testng.SuiteRun nerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1284) at org.testng.TestNG.runSuitesLocally(TestNG.java:1209) at org.testng.TestNG.runSuites(TestNG.java:1124) at org.testng.TestNG.run(TestNG.java:1096) at runTestNG.RunTestng.runTestNG(RunTestng.java:19) at runner.Runner.main(Runner.java:11) Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. 位于org.testng.TestNG.runSuites(testNG.:::::::: or or .java:1124)atg.testng.TestNG.run(TestNG.java:1096)at runTestNG.RunTestng.runTestNG(RunTestng.java:19)at runner.Runner.main(Runner.java:11)​​引起:org .openqa.selenium.SessionNotCreatedException:无法创建新的远程会话。 desired capabilities = Capabilities [{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}], required capabilities = null Build info: version: 'unknown', revision: 'c7b525d', time: '2016-09-01 14:52:30 -0700' System info: 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 info: driver.version: AndroidDriver at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:80) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:69) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:597) 期望的能力=能力[{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}],required capabilities = null构建信息:版本:'unknown',修订版:'c7b525d',时间:'2016-09-01 14:52:30 -0700'系统信息:主机: '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 atg.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:80)ato.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)at io。 orch.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:597)中的appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:69)

Please check the packages that you included selenium 2.53.1 source and 2.53.1 jar. 请检查包含selenium 2.53.1 source和2.53.1 jar的软件包。 and include all the jar files present in the lib folder after extracting selenium 2.53.1. 并在提取selenium 2.53.1后包含lib文件夹中存在的所有jar文件。 -use testng.xml file to set the flow of the test case. -use testng.xml文件用于设置测试用例的流程。

Authorship: Imran Ansari, colleague of mine. 作者:Imran Ansari,我的同事。

我只是通过更改应用程序路径解决了这个问题

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

更改正确的App路径(apk路径)后工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Selenium 3.0 Firefx 驱动程序因 org.openqa.selenium.SessionNotCreatedException 失败:无法创建新的远程会话 - Selenium 3.0 Firefx Driver fails with org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session org.openqa.selenium.SessionNotCreatedException:无法启动新的 session。 使用驱动程序 service-docker 容器创建 session 时出错 - org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Error while creating session with the driver service-docker container WinAppDriver:org.openqa.selenium.SessionNotCreatedException:无法创建新的远程 session - WinAppDriver: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session Appium 错误:线程“main”org.openqa.selenium.SessionNotCreatedException 中的异常:无法创建新的远程会话 - Appium Error :Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session org.openqa.selenium.SessionNotCreatedException:无法在Mac中创建新的远程会话 - org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session in Mac org.openqa.selenium.SessionNotCreatedException:消息:无法启动新的 session。响应代码 500 错误使用 Selenium Java - org.openqa.selenium.SessionNotCreatedException: Message: Could not start a new session. Response code 500 error using Selenium Java org.openqa.selenium.SessionNotCreatedException:消息:无法启动新的 session。使用 Appium Java 时出现响应代码 500 错误 - org.openqa.selenium.SessionNotCreatedException: Message: Could not start a new session. Response code 500 error using Appium Java org.openqa.selenium.SessionNotCreatedException:无法通过 Selenium 和 Java 使用 GeckoDriver 和 Firefox 创建会话错误 - org.openqa.selenium.SessionNotCreatedException: Unable to create session error using GeckoDriver and Firefox through Selenium and Java org.openqa.selenium.SessionNotCreatedException - org.openqa.selenium.SessionNotCreatedException org.openqa.selenium.SessionNotCreatedException - org.openqa.selenium.SessionNotCreatedException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM