Skip to content

Commit 91cc397

Browse files
committed
A few updates to the driver installation script
1 parent abf9816 commit 91cc397

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

seleniumbase/console_scripts/sb_install.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
DEFAULT_CHROMEDRIVER_VERSION = "2.44"
4343
DEFAULT_GECKODRIVER_VERSION = "v0.26.0"
4444
DEFAULT_EDGEDRIVER_VERSION = "79.0.309.65"
45-
DEFAULT_OPERADRIVER_VERSION = "v.75.0.3770.100"
45+
DEFAULT_OPERADRIVER_VERSION = "v.81.0.4044.113"
4646

4747

4848
def invalid_run_command():
@@ -336,13 +336,18 @@ def main(override=None):
336336
print("")
337337
elif name == "edgedriver" or name == "msedgedriver":
338338
if "darwin" in sys_plat or "linux" in sys_plat:
339+
# Was expecting to be on a Windows OS at this point
339340
raise Exception("Unexpected file format for msedgedriver!")
340341
expected_contents = (['Driver_Notes/',
341342
'Driver_Notes/credits.html',
342343
'Driver_Notes/LICENSE',
343344
'msedgedriver.exe'])
344-
if len(contents) != 4:
345+
if len(contents) > 4:
345346
raise Exception("Unexpected content in EdgeDriver Zip file!")
347+
for content in contents:
348+
if content not in expected_contents:
349+
raise Exception("Expected file [%s] missing from [%s]" % (
350+
content, expected_contents))
346351
# Zip file is valid. Proceed.
347352
driver_path = None
348353
driver_file = None
@@ -376,12 +381,9 @@ def main(override=None):
376381
print("Making [%s %s] executable ..." % (driver_file, use_version))
377382
make_executable(driver_path)
378383
print("[%s] is now ready for use!" % driver_file)
379-
print("Add folder path of Edge to System Environmental Variables!")
380384
print("")
381385
elif name == "operadriver":
382-
if len(contents) != 3:
383-
raise Exception("Unexpected content in OperaDriver Zip file!")
384-
elif sorted(contents) != sorted(expected_contents):
386+
if len(contents) > 3:
385387
raise Exception("Unexpected content in OperaDriver Zip file!")
386388
# Zip file is valid. Proceed.
387389
driver_path = None

0 commit comments

Comments
 (0)