gpt4 book ai didi

selenium-ide - 无法创建新的服务 geckodriver; Selenium 独立服务器;

转载 作者:行者123 更新时间:2023-12-04 15:07:27 27 4
gpt4 key购买 nike

我面临着与 Java 相同的问题,但那里的答案对我没有帮助,我有一个 selenium 独立服务器。

我在用
Java版本“1.8.0_144”
Java(TM) SE 运行时环境 (build 1.8.0_144-b01)
Java HotSpot(TM) 64 位服务器 VM(内部版本 25.144-b01,混合模式)
window 8.1

11:10:47.836 信息 - Selenium 构建信息:版本:'3.5.3',修订:'a88d25fe6b'

并尝试启动一个 selenium 独立服务器。启动协议(protocol):

C:\Java_External_Jars_e_g_Selenium>"C:\Program Files\Java\jdk1.8.0_144\bin\java"
-jar "C:\Java_External_Jars_e_g_Selenium\selenium-server-standalone-3.5.3.jar"
11:10:47.836 INFO - Selenium build info: version: '3.5.3', revision: 'a88d25fe6b
'
11:10:47.837 INFO - Launching a standalone Selenium Server
2017-08-31 11:10:47.858:INFO::main: Logging initialized @259ms to org.seleniumhq
.jetty9.util.log.StdErrLog
11:10:47.912 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:10:47.943 INFO - Driver provider class org.openqa.selenium.safari.SafariDrive
r registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform
=MAC}] does not match the current platform WIN8_1
11:10:47.983 INFO - Using the passthrough mode handler
2017-08-31 11:10:48.009:INFO:osjs.Server:main: jetty-9.4.5.v20170502
2017-08-31 11:10:48.031:WARN:osjs.SecurityHandler:main: ServletContext@o.s.j.s.S
ervletContextHandler@eec5a4a{/,null,STARTING} has uncovered http methods for pat
h: /
2017-08-31 11:10:48.036:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletC
ontextHandler@eec5a4a{/,null,AVAILABLE}
2017-08-31 11:10:48.137:INFO:osjs.AbstractConnector:main: Started ServerConnecto
r@1f7030a6{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2017-08-31 11:10:48.138:INFO:osjs.Server:main: Started @539ms
11:10:48.138 INFO - Selenium Server is up and running

通过启动我记录的 Selenium 脚本,我在第一条语句中出现错误,说 go to an URL :

Server-Error : Unable to create new service: GeckoDriverService Build info: version: '3.5.3', revision: 'a88d25fe66', time '2017-08-29T12:54:15.039Z' System info: host: 'PAVILION17' ip: 192.168.178.39', os.name: 'windows 8.1', os.arch: 'amd64', os.version: 6.3,java

最佳答案

在您的 jar 命令中,您没有指定 -Dwebdriver.gecko.driver=C:\path\to\geckodriver.exe .我相信您需要将其添加到您的 java 命令中。它应该看起来像:

"C:\Program Files\Java\jdk1.8.0_144\bin\java" -jar -Dwebdriver.gecko.driver="C:\path\to\geckodriver.exe" "C:\Java_External_Jars_e_g_Selenium\selenium-server-standalone-3.5.3.jar"

这将确保您的 selenium 独立服务器知道将用于启动 Firefox 浏览器的 gecko 驱动程序二进制文件。您可以从 mozilla/geckodriver GitHub release page 下载 gecko 驱动程序二进制文件。 .

关于selenium-ide - 无法创建新的服务 geckodriver; Selenium 独立服务器;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45981951/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com