Home > Mobile >  Selenium WebDriver Firefox Error: API Rate limit exceeded. You have to add GH_TOKEN
Selenium WebDriver Firefox Error: API Rate limit exceeded. You have to add GH_TOKEN

Time:05-25

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

CodePudding user response:

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

CodePudding user response:

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

  • Related