简体   繁体   English

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

[英]JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory error using GeckoDriver Firefox and Selenium

I am getting below error even though I had set the correct path for gecko driver.即使我为壁虎驱动程序设置了正确的路径,我也遇到了错误。

Main:主要的:

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");
    }
}

Error:错误:

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

This error message...此错误消息...

JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.

...implies that there was a JavaScript error while GeckoDriver initiated/spawned a new Browsing Context ie Firefox browsing session. ...暗示在GeckoDriver启动/产生新的浏览上下文时出现JavaScript错误,即Firefox浏览 session。


When Selenium driven GeckoDriver initiates a Firefox browsing session there can be a couple of JavaScript related WARNINGS and ERRORS as a part of TRACE level logs during initialization. When Selenium driven GeckoDriver initiates a Firefox browsing session there can be a couple of JavaScript related WARNINGS and ERRORS as a part of TRACE level logs during initialization. You can safely ignore those initialization errors till GeckoDriver is successfully able to initiate a Firefox Browsing session.您可以放心地忽略这些初始化错误,直到GeckoDriver能够成功启动Firefox 浏览session。


Conclusion结论

When the createSession is successful and W3C dialect is detected you can safely ignore the errors.createSession成功并且检测到W3C方言时,您可以放心地忽略错误。

暂无
暂无

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

相关问题 在Selenium的Firefox浏览器窗口中运行某些测试时出现“找不到配置文件目录”错误 - “Can't find profile directory” error while running some tests in a Firefox browser window by Selenium 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 java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap 在 Java 中通过 Selenium 使用 GeckoDriver Firefox 时出错 - java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap error using GeckoDriver Firefox through Selenium in Java SessionNotCreatedException:尝试通过 Java 使用 Selenium GeckoDriver 和 Firefox 运行命令而不建立连接错误 - SessionNotCreatedException: Tried to run command without establishing a connection error using Selenium GeckoDriver and Firefox through Java 无法通过 Jenkins 中的 Selenium Maven 使用 GeckoDriver Firefox 建立与 WindowServer 错误的默认连接 - FAILED TO establish the default connection to the WindowServer error using GeckoDriver Firefox through Selenium Maven in Jenkins 我正在尝试在 Ubuntu 22.04.1 LTS 中使用 Geckodriver 为 selenium webDriver 启动 Firefox 并得到错误消息 - I am trying to launch Firefox using geckodriver for selenium webDriver in Ubuntu 22.04.1 LTS and got error msg as - Selenium错误-无法运行Firefox - Selenium Error— Can't be able to run Firefox 如果使用单独的配置文件,则无法使用Firefox geckodriver,它将给出错误:java.lang.OutOfMemoryError:Java堆空间 - Not working using Firefox geckodriver if you use a separate profile, it gives an error: java.lang.OutOfMemoryError: Java heap space Selenium:启动 GeckoDriver createArgs() 的 AbstractMethod 错误 - Selenium: AbstractMethod error starting GeckoDriver createArgs() 信息:HTTP 状态:“404”-> GeckoDriver、Firefox 和 Selenium 通过 Java 的“未知错误”的 JSON 状态映射不正确 - INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'unknown error' with GeckoDriver, Firefox and Selenium through Java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM