Selenium Cannot assign requested address

If you’re using BDD (Cucumber or Behat for example) with Selenium, you may find you occasionally get an error where the framework is unable to communicate with the Selenium server.

Failed to connect to 127.0.0.1: Cannot assign requested address

This seems to occur when there are two many requests going to Selenium. This can be alleviated be rewriting your tests to ensure you are now sending too many requests at once.

For example, if you’re using Behat/Mink, then avoid using the wait() function on the Session object, as this can cause excessive requests to be sent to Selenium.

Timeline

Newsletter

Don't have time to check my blog? Get a weekly email with all the new posts. This is my personal blog, so obviously it is 100% spam free.

Metadata

Tags: , , ,

This entry was posted on Friday, March 15th, 2013 at 10:15 am and is filed under Life, Tech. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.