1. Your code might run a redundant Edge Driver copy. Search for any redundant Edge Driver using keywords like "msedgedriver" or "MicrosoftWebDriver" tp locate older versions and delete those.
2. You can specify the actual path by changing -
Quote:
self.driver = webdriver.Edge()
to -
self.driver = webdriver.Edge(executable_path='/path/to/msedgedriver')
3. You can back up your User Data folder in the same path and use that folder in selenium.
4. Try running without headless mode running it without headless mode enabled. Headless mode can sometimes cause compatibility issues. Comment out or remove the line that sets headless mode -
Quote:
options.add_argument('--headless')
if used.
See these 2 solutions which might help solve your issue -
MSEdge failed to start: crashed (chrome not reachable)[
^]
Selenium failing[
^]
Not my field of expertise so I hope the above from Google helps.