File tree 1 file changed +16
-0
lines changed
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):
1060
1060
browsers [browser ]['version' ] = get_file_version (exe )
1061
1061
1062
1062
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
+
1063
1076
# Constant used for --logformat command line parameter mapping
1064
1077
LOG_FORMATS = ["syslog" ]
1065
1078
@@ -1269,6 +1282,9 @@ def main():
1269
1282
logging .critical ("Requires python 2.7" )
1270
1283
exit (1 )
1271
1284
1285
+ # Make sure we are using a compatible selenium version
1286
+ fix_selenium_version ()
1287
+
1272
1288
if options .list :
1273
1289
from internal .ios_device import iOSDevice
1274
1290
ios = iOSDevice ()
You can’t perform that action at this time.
0 commit comments