简体   繁体   English

使用 GeckoDriver 和 Firefox 通过 Selenium 和 Java 的此会话警告将忽略 Marionette-WARN-TLS 证书错误

[英]Marionette-WARN-TLS certificate errors will be ignored for this session warning using GeckoDriver and Firefox through Selenium and Java

Iam a beginner in Selenium WebDriver.我是 Selenium WebDriver 的初学者。 I wrote a code to just navigate to a URL and login to that.我编写了一个代码来导航到一个 URL 并登录到该 URL。 Also to show a message in console of the string URL is correct as the current URL.此外,在字符串 URL 的控制台中显示消息与当前 URL 一样是正确的。 The code is executing succesfully and is working as expected.代码已成功执行并按预期工作。 Its logging in. But at the same time getting some warning messaged in the console.它正在登录。但同时在控制台中收到一些警告消息。 can some one please let me know the reason for the warning message?有人可以告诉我警告消息的原因吗? Is it because any jar files are missing?是因为缺少任何jar文件吗? I'm using the latest versions of JDK and Selenium WebDriver.我正在使用最新版本的 JDK 和 Selenium WebDriver。 Please see below the code snippet and the console Error.请参阅下面的代码片段和控制台错误。

Code as below :代码如下:

 package testSelenium1; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class admin { public static void main(String args[]) { System.setProperty("webdriver.gecko.driver","C:\\\\Users\\\\30211170\\\\Downloads\\\\geckodriver-v0.26.0-win64\\\\geckodriver.exe"); WebDriver driver = new FirefoxDriver();// Launches firefox browser with blank URL driver.get("http://www.gcrit.com/build3/admin/login.php?"); driver.findElement(By.name("username")).sendKeys("admin"); driver.findElement(By.name("password")).sendKeys("admin@123"); driver.findElement(By.id("tdb1")).click(); String url = driver.getCurrentUrl(); if (url.equals("http://www.gcrit.com/build3/admin/index.php")) { System.out.println("Login is success"); } else { System.out.println("Log in failed"); } } }

Warning message as below :警告信息如下:

 1576773751789 mozrunner::runner INFO Running command: "C:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\\\Users\\\\30211170\\\\AppData\\\\Local\\\\Temp\\\\rust_mozprofile69gY6Q" 1576773753129 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons 1576773753129 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry 1576773753130 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/ 1576773753130 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader* JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. 1576773756768 Marionette INFO Listening on port 64629 1576773757219 Marionette WARN TLS certificate errors will be ignored for this session Dec 19, 2019 10:12:37 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C Login is success

This WARNING message...此警告消息...

1576850500604   Marionette  WARN    TLS certificate errors will be ignored for this session

...implies that the Marionette will ignore TLS certificate errors for this session. ...表示Marionette将忽略此会话的 TLS 证书错误。

This WARNING is generated when Selenium initiates a new Browsing Context ie Firefox Browser session using through .Selenium通过使用启动新的浏览上下文(即Firefox 浏览器会话)时,会生成此警告


Conclusion结论

This WARNING message isn't harmful for your @Tests and you can ignore it safely.WARNING消息对您的@Tests 无害,您可以安全地忽略它。

暂无
暂无

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

相关问题 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 通过 Selenium 和 Java 使用 GeckoDriver 和 Firefox 无法点击链接 - Link is not clickable 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 对等方的证书具有无效签名。 错误代码:Selenium GeckoDriver 和 Firefox 通过 Java 出现 SEC_ERROR_BAD_SIGNATURE 错误 - Peer’s certificate has an invalid signature. Error code: SEC_ERROR_BAD_SIGNATURE error with Selenium GeckoDriver and Firefox through Java SessionNotCreatedException:尝试通过 Java 使用 Selenium GeckoDriver 和 Firefox 运行命令而不建立连接错误 - SessionNotCreatedException: Tried to run command without establishing a connection error using Selenium GeckoDriver and Firefox through Java 如何通过GeckoDriver和Selenium启动Firefox浏览器 - How to launch Firefox browser through GeckoDriver and Selenium Selenium 与 java 问题使用 webdriver.firefox.marionette - Selenium with java issue using webdriver.firefox.marionette 我可以在没有网页检测牵线木偶的情况下使用 geckodriver 运行 Selenium 吗? - Can I run Selenium using geckodriver without a webpage detecting marionette? 如何使用 GeckoDriver Firefox 和 Selenium 下载文件? - How to download files using GeckoDriver Firefox and Selenium? Firefox不是使用Geckodriver和Selenium推出的 - 它适用于Chrome - Firefox is not launched using Geckodriver and Selenium - It works with Chrome
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM