- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Python 3.7.3
Pycharm 2019.1.3
Selenium 独立3.14.0
Selenium 3.141.0
Java JDK 12.0.2
Windows 7
当我尝试使用远程网络驱动程序运行脚本时出现错误,我的java.version 不是我所期望的(预计版本至少为 12。):
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to create new service: ChromeDriverService
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: 'host_name', ip: 'localhost', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_221'
Driver info: driver.version: unknown
Stacktrace:
at org.openqa.selenium.remote.server.ServicedSession$Factory.lambda$get$0 (ServicedSession.java:134)
at org.openqa.selenium.remote.server.ServicedSession$Factory.apply (ServicedSession.java:151)
at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12 (ActiveSessionFactory.java:177)
at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
at java.util.stream.ReferencePipeline$11$1.accept (None:-1)
at java.util.stream.ReferencePipeline$2$1.accept (None:-1)
at java.util.Spliterators$ArraySpliterator.tryAdvance (None:-1)
at java.util.stream.ReferencePipeline.forEachWithCancel (None:-1)
at java.util.stream.AbstractPipeline.copyIntoWithCancel (None:-1)
at java.util.stream.AbstractPipeline.copyInto (None:-1)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (None:-1)
at java.util.stream.FindOps$FindOp.evaluateSequential (None:-1)
at java.util.stream.AbstractPipeline.evaluate (None:-1)
at java.util.stream.ReferencePipeline.findFirst (None:-1)
at org.openqa.selenium.remote.server.ActiveSessionFactory.apply (ActiveSessionFactory.java:180)
at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2 (NewSessionPipeline.java:65)
at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
at java.util.stream.ReferencePipeline$2$1.accept (None:-1)
at java.util.Collections$2.tryAdvance (None:-1)
at java.util.stream.ReferencePipeline.forEachWithCancel (None:-1)
at java.util.stream.AbstractPipeline.copyIntoWithCancel (None:-1)
at java.util.stream.AbstractPipeline.copyInto (None:-1)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (None:-1)
at java.util.stream.FindOps$FindOp.evaluateSequential (None:-1)
at java.util.stream.AbstractPipeline.evaluate (None:-1)
at java.util.stream.ReferencePipeline.findFirst (None:-1)
at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3 (NewSessionPipeline.java:68)
at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
at java.util.stream.DistinctOps$1$2.accept (None:-1)
at java.util.stream.ReferencePipeline$2$1.accept (None:-1)
at java.util.stream.ReferencePipeline$3$1.accept (None:-1)
at java.util.stream.ReferencePipeline$2$1.accept (None:-1)
at java.util.stream.Streams$StreamBuilderImpl.tryAdvance (None:-1)
at java.util.stream.Streams$ConcatSpliterator.tryAdvance (None:-1)
at java.util.stream.ReferencePipeline.forEachWithCancel (None:-1)
at java.util.stream.AbstractPipeline.copyIntoWithCancel (None:-1)
at java.util.stream.AbstractPipeline.copyInto (None:-1)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (None:-1)
at java.util.stream.FindOps$FindOp.evaluateSequential (None:-1)
at java.util.stream.AbstractPipeline.evaluate (None:-1)
at java.util.stream.ReferencePipeline.findFirst (None:-1)
at org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession (NewSessionPipeline.java:71)
at org.openqa.selenium.remote.server.commandhandler.BeginSession.execute (BeginSession.java:65)
at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$3 (WebDriverServlet.java:250)
at java.util.concurrent.Executors$RunnableAdapter.call (None:-1)
at java.util.concurrent.FutureTask.run (None:-1)
at java.util.concurrent.ThreadPoolExecutor.runWorker (None:-1)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (None:-1)
at java.lang.Thread.run (None:-1)
我尝试重新安装 java JDK,但版本保持不变 - 1.8.0_221
我的Python代码:
driver = webdriver.Remote(
command_executor='http://10.20.10.193:4444/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)
driver.get('https://google.com')
设置 Selenium 服务器:
java -jar selenium-server-standalone-3.14.0.jar
我做错了什么?
最佳答案
此错误消息...
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to create new service: ChromeDriverService
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: 'host_name', ip: 'localhost', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_221'
Driver info: driver.version: unknown
...暗示 ChromeDriver 未被识别。
您的主要问题是您使用的二进制文件版本之间不兼容,如下所示:
支持的 Python 版本:
Python 2.7, 3.4+
但是 selenium 3.141.0 上的列表页面仅包含:
因此可能仍然不支持 Python 3.7.3,您可能必须将 python 降级到相关版本。
<小时/>Unable to import org.openqa.selenium.WebDriver using Selenium and Java 11
关于python - SessionNotCreatedException : Message: Unable to create new service: ChromeDriverService with Selenium 3. 14.0 和 Python 3.7.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57461544/
我已经在 cucumber 的一个功能文件中实现了两个场景大纲,并且还编写了当我的测试用例失败时新浏览器在 @After Junit 命令中启动的脚本。 @After public void tear
我尝试启动 appium 第一个测试,但出现错误,但某些字段不为空。我的错误日志是: ** Exception in thread "main" org.openqa.selenium.Session
使用 selenium 和 Chrome webdriver,我在尝试启动时遇到以下异常。我浏览了很多帖子并尝试了所有可能的方法。我正在使用兼容的 Chrome 浏览器和 Chrome 驱动程序版本
我正在尝试在 Eclipse 中运行以下测试: public class AppiumTestOne { private static AndroidDriver driver; @Test publ
public class Admin { public static void main(String args[]) throws MalformedURLException
在执行 java 代码期间执行 driver.close();driver.quit(); 时,会引发以下错误: Exception in thread "main" org.openqa.selen
我正在运行适用于 Android 应用程序的 appium 脚本。 但它根本没有运行。 我已经在我的 Maven 项目中添加了运行测试所需的所有依赖项。 添加下面的所有代码。 请检查并帮助我。 启动类
我尝试使用 ios-driver ( http://ios-driver.github.io/ios-driver/setup.html ) 在 Mac OS X 10.9.1 上使用 XCode 附
我正在尝试使用 ChromeDriver 运行一些 Selenium 测试,但我开始收到此错误: Starting ChromeDriver 2.23.409699 (49b0fa931cda1caa
在模拟器设备中初始化android驱动程序时产生sessionnotcreatedexception。我是android自动化的新手。有人能帮忙吗?. 2016年11月18日下午5:35:25 org
无论我尝试什么;最新的 chrome 浏览器、最新的 chromedriver、最新的 selenium 服务器等,但是当我在 Mac OSX 上运行测试时,我不断收到上述错误。我看过其他类似的问题,
这是我的代码,我无法创建节点,并且它抛出异常 FAILED: runtestorg.openqa.selenium.SessionNotCreatedException:无法创建新服务:ChromeD
我无法找出这里的错误:我在 Saucelabs 上使用 Gecko 0.16 和 Selenium 3.4 以及 FF54。 这是控制台输出: org.openqa.selenium.SessionN
我在 AWS(EC2 实例)的 Ubuntu 环境中遇到 Selenium + Chromedriver 的问题。 我正在使用 Chromedriver Linux64 版本( wnload chro
我想用 Java 编写一个 Selenium Grid 应用程序。 关于http://localhost:4444/grid/console它表示该节点已连接到集线器。 在客户端我想编写以下内容: t
我对 selenium 相当陌生,并尝试使用以下 java 代码调用 Firefox 浏览器。 import org.openqa.selenium.WebDriver; import org.ope
当我尝试在 Selenium 中创建 Firefox 实例时,出现以下错误: Message: Expected browser binary location, but unable to find
这个问题在这里已经有了答案: unknown error: session deleted because of page crash from unknown error: cannot dete
我正在尝试从集线器到节点运行一个简单的代码,集线器和节点连接成功。 执行程序时出现异常 org.openqa.selenium.SessionNotCreatedException 我提到的 Chro
我是 Appium 的新手。我正在尝试在我的 Android 模拟器上使用 Appium 测试用例运行测试以打开 Chrome 浏览器并搜索“google.com” 我已经尝试了很多方法来解决我的问题
我是一名优秀的程序员,十分优秀!