C # Selenium WebDriver - FirefoxDriver error: failed to start socket at 45000

I get the following exception when I try to run selenium C # webdriver scripts using Firefox browser.

OpenQA.Selenium.WebDriverException was unhandled by user code HResult=-2146233088 Message=Failed to start up socket within 45000 Source=WebDriver StackTrace: at OpenQA.Selenium.Firefox.Internal.ExtensionConnection.ConnectToBrowser(Int64 timeToWaitInMilliSeconds) in 

The same scripts worked fine two days ago and are not sure why they are not working right now.

  • I added selenium DLL directly to my PROJECT and without NUGETS [I donโ€™t know what it is]
  • I tried looking at netstat and could not see that any port is working on 45000 cmd> netstat -abno | find / n / i "45000"
  • I tried to remove the entire automation package and checked the code from SVN. DIDNT WORK
  • I delete the firefox profile, uninstall and install the new firefox profile. Did not help.

This is pretty surprising, as it causes this error all of a sudden, and within a few months I run these scripts and work perfectly. The same โ€œSolutionโ€ works on different PCs, as well as firefox, and works in the Chrome browser on my machine.

PS - I use selenium 2.23 and I donโ€™t think I need to update the version, as well as the same scripts that work fine on another machine.

Could you tell me any alternatives, I can try to fix this, please.

+4
source share
6 answers

I had the same problem and decided to upgrade it with Selenium packages with NuGet .

I would recommend you add NuGet to Visual Studio and add Selenium packages this way, and this will probably solve the problem for you.

I also had problems with Chrome and IE drivers for Selenium , which are not available through NuGet , and I solved the problems here by downloading the latest versions from Selenium .

+1
source

You need to use the appropriate version of Firefox with a selenium IDE.

You probably need to downgrade Firefox or update the Selenium IDE, like Arran's comment.

I had the same problem because I had selenium 1.9 and Firefox 17, but this version of ide should be released:

Selenium Release Notes

1.10.0 (to be released) New - Added support for Firefox 16 and 17

1.9.1 New - Added support for Firefox 15

1.9.0 New - Added support for Firefox 14

0
source

The problem can be solved if all components of selenium (RC, Support, WebDriver, WebDriverBackedSelenium) are removed through NuGet and installed again through NuGet.

0
source

I had the same problem and solved it by upgrading my version of Selenium to 2.31 and then reinstalling firefox because it was localized in Program Files (x86) / Firefox 3.6 / (I always updated it to and its location has not changed from version 3.6). After reinstalling and rebooting, everything works fine.

0
source

My problem was resolved with

  • copying the test project to several levels directly
  • into a new solution
  • is no longer in the directory.

I knew that something happened when the same code and the same project that worked in one folder did not work in another.

0
source

Remove the dll dll webdriver added to your project and install the new DLLs from Nuget. I got the same error, I added Firebug to firefox, or maybe it was updated, so older versions of the DLL did not support.

0
source

Source: https://habr.com/ru/post/1446450/


All Articles