4

Using the sample test code from SeleniumHQ github, I tried to run this code:

def test_firefox_session():
service = FirefoxService(executable_path=GeckoDriverManager().install())

driver = webdriver.Firefox(service=service)

driver.quit()

The test resulted as a failed test, with the error:

ValueError: API Rate limit exceeded. You have to add GH_TOKEN!!!

The test cases for Chrome and Edge browsers were successful.

Any help is much appreciated, preferably using webdriver-manager

Versions: Selenium: 4.1.5 webdriver_manager: 3.7.0 python: 3.10 Firefox: 100.0

2 Answers2

1

You need to generate a github token and then pass it to .env. More details are inside the webdriver_manager repository https://github.com/SergeyPirogov/webdriver_manager#gh_token

Jakub Sagan
  • 53
  • 1
  • 1
  • 6
1

Firefox drivers are stored in Github. A GitHub has a rate limit for API calls, so to increase these limits you have to provide a Github token. See more info here https://github.com/SergeyPirogov/webdriver_manager#gh_token

  • Doesn't work in my environment see https://github.com/SergeyPirogov/webdriver_manager/issues/433 – Wolfgang Fahl Aug 30 '22 at 07:40
  • That sound highly suspicious, like a fishing attempt. Why on earth would there be a rate limit on downloading https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz –  Oct 09 '22 at 08:29