Home > Software design >  "DevToolsActivePort file doesn't exist" with ChromiumEdge
"DevToolsActivePort file doesn't exist" with ChromiumEdge

Time:07-27

I've seen a lot of iterations of this question, but every single one of them were using Chrome. I'm trying to use Selenium to automate for work, but when I try to run my code on my company computer it fails, even though it was working perfectly on my personal computer. I'm given the error "selenium.common.exceptions.WebDriverException: Message: DevToolsActivePort doesn't exist". I think it might be due to the cloud system that my workplace uses, but I'm not sure what to do about it. I attempted fixes suggested to Chrome users, but I haven't been able to pass options to the Edge() initializer.

My code fails already at this point.

from selenium import webdriver
browser = webdriver.Edge()

CodePudding user response:

Adding the argument "--remote-debug-port=xxxx" fixed the issue.

I had some problems with edge-selenium-tools and selenium4, but after uninstalling the former I was able to add options to the Edge driver.

  • Related