Free-Games icon indicating copy to clipboard operation
Free-Games copied to clipboard

Add automatic WebDriver download

Open LukeSavefrogs opened this issue 3 years ago • 0 comments

Proposal

Add webdriver-manager dependency to automate the process of retrieving the correct version of GeckoDriver (or ChromeDriver if needed) when user launches the script.

Result

If user installed a newer version of the browser this package will automatically download the correct version of the driver.

How

It is as simple as adding this dependency to the requirements.txt and then adding:

from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager

driver = webdriver.Firefox(executable_path=GeckoDriverManager().install())

LukeSavefrogs avatar Nov 29 '21 10:11 LukeSavefrogs