1

Iam a beginner in Selenium WebDriver. I wrote a code to just navigate to a URL and login to that. Also to show a message in console of the string URL is correct as the current 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? I'm using the latest versions of JDK and 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
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Sru
  • 33
  • 9
  • 1
    It's some warnings. The only thing that's really interesting is the TLS warning, and my guess is that it's so that Selenium can proceed with testing in a self-signed environment. If your test worked, don't worry about it. – chrylis -cautiouslyoptimistic- Dec 20 '19 at 08:23
  • @jayasrees Which `WARN` message are you concerned with _...WARN TLS certificate errors will be ignored for this session..._ ? – undetected Selenium Dec 20 '19 at 09:40
  • @DebanjanB Yes. Also in Line 2,3,4,5 and some javascript error in line 6. I'm all new to this. So I don't know what these all mean. I can see 'WARN' in most of the lines which I assume as a warning message. – Sru Dec 20 '19 at 12:51
  • @jayasrees Can you reduce the scope of your question to limit it to a specific problem to identify an adequate answer. Please avoid asking multiple distinct questions at once. – undetected Selenium Dec 20 '19 at 12:55
  • @DebanjanB Sorry. Question is on the warning comments that I have attached under 'Warning message as below :'. Will those warnings be always there? I'm getting the expected result so do I need to take care of warnings? – Sru Dec 20 '19 at 15:10
  • 1
    @jayasrees Those `WARNINGS` are from _Mozilla_ `addons` and are also unharmful. You are still safe :) – undetected Selenium Dec 20 '19 at 15:12

1 Answers1

2

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.

This WARNING is generated when Selenium initiates a new Browsing Context i.e. Firefox Browser session using through .


Conclusion

This WARNING message isn't harmful for your @Tests and you can ignore it safely.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352