[英]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 geckodriver through marionette .当Selenium通过marionette使用geckodriver启动新的浏览上下文(即Firefox 浏览器会话)时,会生成此警告。
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.