2

When running Selenium automated tests in C# through SpecRunner using ChromeDriver (especially when running in multiple threads), we keep intermittently seeing this exception:

Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted

It happens randomly on about 20% of tests every run and gets worse as more threads are added.

We are really at wit's end, so any ideas/suggestions are welcome.

arezzy
  • 21
  • 2

1 Answers1

0

From class ChromeOptions, try comment the argument --remote-debugging-port It works for me.

For example:

ChromeOptions chromeOptions = new ChromeOptions
{
    AcceptInsecureCertificates = true        
};
//chromeOptions.AddArgument("--remote-debugging-port=922");

Maybe you are using chromeOptions.AddArgument("--remote-debugging-port=922");

"That line" is currently deprecated.

Sorry for late

Diego Ripera
  • 55
  • 1
  • 4