0

I'm having real trouble to switch control from desktop application using let to a chrome web browser using selenium.

Here is what I have done:

I'm having an issue connecting to chrome debug port .

  • Added chrome.exe to my environment variable path

  • Configured the chrome debug port thru command line and specified port: 22020

  • Added

    options.SetExperimentalOption("debuggerAddress", "localhost:22020")
    

But chrome keeps starting from a random port numbers , and I'm getting the following error:

cannot connect to chrome at localhost:22020

Please help

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

0

While starting a Selenium driven ChromeDriver initiated Browsing Context using:

options.SetExperimentalOption("debuggerAddress", "localhost:22020")

this error message...

cannot connect to chrome at localhost:22020

...can occur due to a lot of reasons.

An immediate solution would be to shift from hostname:port to ip:port as follows:

options.SetExperimentalOption("debuggerAddress", "127.0.0.1:22020")

Some of the known reasons are:

  • Port 22020 which may be blocked by some other services.
  • Your system have security software installed that is listening on this port or using network web filtering.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352