I have been utilizing Selenium for some time however with a barely totally different scope (really constraints). As a substitute of operating a take a look at for a specific web site, I am as an illustration in filling in an internet kind from a 3rd get together web site and get some consequence, as an illustration downloading a file, to make sure its high quality. So, I am primarily concerned with utilizing Selenium to work together with a browser. Thus far, so good. I have been in a position to obtain what I needed.
So, as I am not concerned with “testing” utilizing a Unit Testing Framework like MSTest, I began to make use of Selenium in a standard C# console utility. That labored nice!
Afterwards, as a substitute of launching Selenium from a Console I attempted to do it from: 1) a WCF Software; and likewise from 2) an ASP.NET Internet Software.
These 2 approaches labored effective whereas being launched from inside Visible Studio.
Nevertheless, once I deployed and tried to run these 2 totally different approaches the Seleniumn InternetExplorerDriver server (the identical with chromedriver) was by no means launched versus what occurred when being run from the Console Software.
I am getting the next error:
OpenQA.Selenium.WebDriverException: A exception with a null response was thrown
sending an HTTP request to the distant WebDriver server for URL
http://localhost:3227/session//window. The standing of the exception was ConnectFailure,
and the message was: Unable to hook up with the distant server ---> System.Web.WebException:
Unable to hook up with the distant server ---> System.Web.Sockets.SocketException:
No connection could possibly be made as a result of the goal machine actively refused it 127.0.0.1:3227
at System.Web.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Web.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& handle, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- Finish of interior exception stack hint ---
I am caught there. I guess it might need to do with who’s the Host from the place the Selenium Internet Server is being run and their privileges. That is whether or not it’s a Console, a WCF App or an ASP.NET Internet App (hosted in IIS) however I do not know what to do or the place to look to kind this out.