gpt4 book ai didi

JavaScript 错误 : resource://gre/modules/XULStore. jsm,第 66 行:错误:无法使用 GeckoDriver Firefox 和 Selenium 找到配置文件目录错误

转载 作者:行者123 更新时间:2023-12-03 21:50:54 26 4
gpt4 key购买 nike

即使我为 Gecko 驱动程序设置了正确的路径,我也遇到了错误。
主要的:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class firstCase {
@Test
static void titleControl(){
System.setProperty("webdriver.gecko.driver", "D:\\Program Exe's\\geckodriver-v0.26.0-win64\\geckodriver.exe"); // Wee need that as Intellij doesn't know where it looks for browser
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
Assert.assertEquals(driver.getTitle(),"Google");
}
}
错误:
1594880236960   mozrunner::runner   INFO    Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\yasin\\AppData\\Local\\Temp\\rust_mozprofiledXH35Y"
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
1594880239039 Marionette INFO Listening on port 49419
1594880239073 Marionette WARN TLS certificate errors will be ignored for this session
Tem 16, 2020 9:17:19 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C

最佳答案

这个错误信息...

JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
...暗示有一个 JavaScript GeckoDriver 时出错启动/产生了一个新的浏览上下文,即 Firefox 浏览 session 。

Selenium驱动 GeckoDriver 启动 Firefox 浏览 session ,其中可能有几个与 JavaScript 相关的 WARNINGSERRORS作为 TRACE 的一部分初始化期间的级别日志。您可以放心地忽略这些初始化错误,直到 GeckoDriver 能够成功启动 Firefox 浏览 session 。

结论
createSession成功并 W3C 检测到方言,您可以放心地忽略这些错误。

关于JavaScript 错误 : resource://gre/modules/XULStore. jsm,第 66 行:错误:无法使用 GeckoDriver Firefox 和 Selenium 找到配置文件目录错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62928679/

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