@@ -1837,6 +1837,14 @@ def get_local_driver(
1837
1837
edge_version = e .msg .split (
1838
1838
"only supports MSEdge version "
1839
1839
)[1 ].split (" " )[0 ]
1840
+ elif "DevToolsActivePort file doesn't exist" in e .msg :
1841
+ service = EdgeService (
1842
+ executable_path = LOCAL_EDGEDRIVER ,
1843
+ log_path = os .path .devnull ,
1844
+ )
1845
+ # https://stackoverflow.com/a/56638103/7058266
1846
+ edge_options .add_argument ("--remote-debugging-port=9222" )
1847
+ return Edge (service = service , options = edge_options )
1840
1848
if not auto_upgrade_edgedriver :
1841
1849
raise Exception (e .msg ) # Not an obvious fix. Raise.
1842
1850
else :
@@ -1884,6 +1892,14 @@ def get_local_driver(
1884
1892
edge_version = e .msg .split (
1885
1893
"only supports MSEdge version "
1886
1894
)[1 ].split (" " )[0 ]
1895
+ elif "DevToolsActivePort file doesn't exist" in e .msg :
1896
+ service = EdgeService (
1897
+ executable_path = LOCAL_EDGEDRIVER ,
1898
+ log_path = os .path .devnull ,
1899
+ )
1900
+ # https://stackoverflow.com/a/56638103/7058266
1901
+ edge_options .add_argument ("--remote-debugging-port=9222" )
1902
+ return Edge (service = service , options = edge_options )
1887
1903
if not auto_upgrade_edgedriver :
1888
1904
raise Exception (e .msg ) # Not an obvious fix. Raise.
1889
1905
else :
0 commit comments