Skip to content

Commit 8fda3f3

Browse files
committed
Make "msedge-selenium-tools" optional for Python>=3.7
1 parent 8534eb5 commit 8fda3f3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ requests==2.26.0;python_version<"3.5"
3232
requests==2.25.1;python_version>="3.5" and python_version<"3.6"
3333
requests==2.26.0;python_version>="3.6"
3434
selenium==3.141.0
35-
msedge-selenium-tools==3.141.3
35+
msedge-selenium-tools==3.141.3;python_version<"3.7"
3636
more-itertools==5.0.0;python_version<"3.5"
3737
more-itertools==8.10.0;python_version>="3.5"
3838
cssselect==1.1.0

seleniumbase/core/browser_launcher.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,11 @@ def get_local_driver(
12661266
sys.argv = sys_args # Put back the original sys args
12671267

12681268
# For Microsoft Edge (Chromium) version 80 or higher
1269-
from msedge.selenium_tools import Edge, EdgeOptions
1269+
try:
1270+
from msedge.selenium_tools import Edge, EdgeOptions
1271+
except ModuleNotFoundError:
1272+
os.system("pip install msedge-selenium-tools")
1273+
from msedge.selenium_tools import Edge, EdgeOptions
12701274

12711275
if LOCAL_EDGEDRIVER and os.path.exists(LOCAL_EDGEDRIVER):
12721276
try:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
'requests==2.25.1;python_version>="3.5" and python_version<"3.6"',
149149
'requests==2.26.0;python_version>="3.6"',
150150
"selenium==3.141.0",
151-
"msedge-selenium-tools==3.141.3",
151+
'msedge-selenium-tools==3.141.3;python_version<"3.7"',
152152
'more-itertools==5.0.0;python_version<"3.5"',
153153
'more-itertools==8.10.0;python_version>="3.5"',
154154
"cssselect==1.1.0",

0 commit comments

Comments
 (0)