Suppress Execution Warning Errors

How can I suppress these specific warnings from appearing?

I work on an air gapped site and cannot copy the issue I am having so I will describe it the best I can.

I am getting several yelllow “WARN” warning messages related to Firefox and Chrome. The system wants to reach out to a URL and gets a dns error but it will never be able to because our air gapped system.

Firefox Message 1: “Problem reading geckodriver versions: error sending request for url (URL link): error trying to connect: dns failure: failed to lookup address information: Name does not resolve. Using latest geckodirver version”

Firefox Message 2: "Exception managing firefox: error sending request for url (URL link): error trying to connect: dns error: failed to lookup address information: Name does not resolve

Hi,

These warnings seems to be linked to geckodriver update attempt when starting the driver.

It’s difficult to tell you exactly without more infos on the architecture and test setup but:

  • If the warning comes from a wrapped keyword like Run Keyword And Warn On Failure (on an Open Browser one) you could use Run Keyword And Ignore Error

  • If the warn is rather on driver side, I saw some parameter to avoid autoupdate:

      FirefoxProfile profile = new FirefoxProfile();
      profile.setPreference("app.update.auto", false);
      profile.setPreference("app.update.enabled", false);
      FirefoxDriver browser = new FirefoxDriver(profile);
    
  • If you’re using webdrivermanager from Selenium, there is a parameter offline = true to disable requests for version search

Hope this helps
Regards
Charlie

Thank you for the ideas, but I was able to figure out the issue. I needed to set the argument executible_path equal to my environment geckodriver and chromedirver when running the Open Browser command.

1 Like

Feels like that the issue is that SeleniumManager is trying to update or look for webdrivers.

First set these environment variables;

SE_OFFLINE=true
SE_DEBUG=true
SE_AVOID_BROWSER_DOWNLOAD=true
SE_AVOID_STATS=true

That might help with some of the warnings. For Chrome, i used selenium.webdriver.chrome.service — Selenium 4.25.0 documentation to provide the executable path of chrome webdriver but never checked how whats the process for firefox…