I sometimes start Selenium without an internet connection, and whenever I do that, it displays the following error message:
Exception managing firefox: error sending request for url (https://github.com/mozilla/geckodriver/releases/latest): error trying to connect: dns error: No such host is known. (os error 11001)
Now I could just wrap the code in a try-catch-statement each time, but I was wondering whether there is a proper way to either suppress this error message, or alternatively disable the update check?
For context, I run selenium in python on Windows 10, using geckodriver to connect to Firefox.
I'm assuming you are either using a driver manager or Selenium 4.6+ that now includes Selenium Manager, a driver manager. That's likely the driver manager trying to check if you've got the most recent browser driver installed.
I wouldn't disable the check because it's keeping your browser driver up-to-date. You could put it in a
try-catchto suppress the message and write something to the logs, if you wanted.