Skip to content

Commit

Permalink
Merge pull request #661 from catchpoint/revert-660-revert-655-firefox…
Browse files Browse the repository at this point in the history
…_fix

Revert "Revert "Fix selenium version""
  • Loading branch information
claud-io committed Apr 18, 2024
2 parents 5052c1b + 4cc6fa7 commit 5830f47
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions wptagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,19 @@ def get_browser_versions(browsers):
browsers[browser]['version'] = get_file_version(exe)


def fix_selenium_version():
"""
On older python versions we are going to force selenium version 3.141.0,
newer versions are going to use 4.8.3
"""
from internal.os_util import run_elevated
version = '4.8.3'
if sys.version_info[1] == 6:
version = '3.141.0'

run_elevated(sys.executable, f'-m pip install selenium=={version}')


# Constant used for --logformat command line parameter mapping
LOG_FORMATS = ["syslog"]

Expand Down Expand Up @@ -1269,6 +1282,9 @@ def main():
logging.critical("Requires python 2.7")
exit(1)

# Make sure we are using a compatible selenium version
fix_selenium_version()

if options.list:
from internal.ios_device import iOSDevice
ios = iOSDevice()
Expand Down

0 comments on commit 5830f47

Please sign in to comment.