File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1060,6 +1060,19 @@ def get_browser_versions(browsers):
10601060 browsers [browser ]['version' ] = get_file_version (exe )
10611061
10621062
1063+ def fix_selenium_version ():
1064+ """
1065+ On older python versions we are going to force selenium version 3.141.0,
1066+ newer versions are going to use 4.8.3
1067+ """
1068+ from internal .os_util import run_elevated
1069+ version = '4.8.3'
1070+ if sys .version_info [1 ] == 6 :
1071+ version = '3.141.0'
1072+
1073+ run_elevated (sys .executable , f'-m pip install selenium=={ version } ' )
1074+
1075+
10631076# Constant used for --logformat command line parameter mapping
10641077LOG_FORMATS = ["syslog" ]
10651078
@@ -1269,6 +1282,9 @@ def main():
12691282 logging .critical ("Requires python 2.7" )
12701283 exit (1 )
12711284
1285+ # Make sure we are using a compatible selenium version
1286+ fix_selenium_version ()
1287+
12721288 if options .list :
12731289 from internal .ios_device import iOSDevice
12741290 ios = iOSDevice ()
You can’t perform that action at this time.
0 commit comments