gpt4 book ai didi

java - 无法连接到 selenium webdriver 中的主机 127.0.0.1 问题

转载 作者:行者123 更新时间:2023-11-30 01:04:55 24 4
gpt4 key购买 nike

我正在尝试运行以下示例代码段

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Test
{
public static void main(String[] args)
{
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");

//System.out.println("My new program");

}
}

当我运行这段代码时,出现以下错误。

45000 毫秒后无法连接到端口 7055 上的主机 127.0.0.1。 Firefox 控制台输出:

e6fd}","syncGUID":"zxeywUS-QRBG","location":"app-global","version":"48.0","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1469556455000,"updateDate":1469556455000,"applyBackgroundUpdates":1,"skinnable":true,"size":21899,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"48.0","maxVersion":"48.0"}],"targetPlatforms":[],"seen":true}
1471332673510 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}

Firfox 版本为 48.0eclipse中添加的jar是selenium-java-2.53.0、selenium-java-2.53.0-srcs。

谁能帮我解决这个问题。

最佳答案

FireFox 48 带来了一些不能很好地与 webdriver 兼容的变化。您需要将 firefox 切换到 Marionette。

说明可在此处找到:https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette

关于java - 无法连接到 selenium webdriver 中的主机 127.0.0.1 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38969210/

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