pythonselenium-webdriver

Selenium takes time to load the first page


With the following simple script, I'm trying to load a web page using Selenium on MacOS :

from selenium import webdriver

service = webdriver.firefox.service.Service('/Path to geckodriver', port=56009)
driver = webdriver.Firefox(service=service)

Firefox launches correctly, but takes about 2 minutes to load the first page. After that, I can navigate normally.

What I tried:

Unfortunately, the problem remains.

Thank you very much for your help


Solution

  • This could be a issue with your VPN or LAN settings.

    Do the following:

    1. Reset your vpn settings or remove it
    2. Set your LAN settings to automatically detect settings as below

    enter image description here