-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
duplicateThe answer/solution already exists somewhereThe answer/solution already exists somewhereexternalOutside SeleniumBase's scope. / Ask somewhere else.Outside SeleniumBase's scope. / Ask somewhere else.
Description
Improve WebDriver Management When Running from Executable
Issue Description
When SeleniumBase scripts are packaged into an executable file (using PyInstaller or similar tools), webdrivers are downloaded and stored in a temporary directory that is created and deleted on each execution of the executable file. This is inefficient and causes unnecessary downloads, on Windows systems.
Current Behavior
- When running from an executable (.exe), SeleniumBase downloads webdrivers to a temporary directory on each execution
- This temporary directory is typically removed after the program terminates
- The next execution requires downloading the drivers again
Proposed Solution
Modify SeleniumBase to detect if it's running from an executable file and adjust the DRIVER_DIR accordingly:
- If running from a Python script (.py file): Keep the current behavior
- If running from an executable (has
sys.frozenattribute): Save drivers in a persistent "drivers" folder alongside the executable file
I can create a PR if your are insterested in.
Metadata
Metadata
Assignees
Labels
duplicateThe answer/solution already exists somewhereThe answer/solution already exists somewhereexternalOutside SeleniumBase's scope. / Ask somewhere else.Outside SeleniumBase's scope. / Ask somewhere else.