I have noticed in my testing that sometimes I get "System.Net.WebException: Unable to connect to the remote server" when running tests in Selenium. It appears to happen randomly, but specifically when running multiple tests at the same time.
My current test set up is using Specflow + specrun. Each test creates a new web driver. Usually there are ~8 test threads running. This error will show up 2-3 times for every 100 tests run.
Has anyone seen this, and does anyone have an idea how to resolve it? My guess is that some other test is already using the same port that the driver is trying to run on, or something similar to that. Anyone know a good way to prevent that?