Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Driver Curl Exception

Trying to use Codeception Web Driver and Selenium to emulate ajax through an acceptance test. I was using PhpBrowser but when I was having issues with Ajax my friend suggested WebDriver.

After enabling it and downloading the selenium (and running it) I get the following error.

[WebDriverCurlException]
Curl error thrown for http POST to http://127.0.0.1:4444/wd/hub/session 
with params: {"desiredCapabilities":{"browserName":"googlechrome"}}
Failed to connect to 127.0.0.1 port 4444: Connection Refused

I made sure I was running selenium on port 4444.

 java -jar selenium-server.jar -port 4444

acceptance.suite.yml below

 class_name: AcceptanceTester
 modules:
     enabled:
         - WebDriver
         - REST
     config:
         WebDriver:
             url: 'http://life1605.dev'
             browser: googlechrome
         REST:
             url: 'http://life1605.dev'
like image 344
Dylan Buth Avatar asked Sep 16 '14 00:09

Dylan Buth


1 Answers

I had the same problem, with the exact same error message. For some strange reason, it looked like starting the selenium server from command line did not work.

My solution turned out to be manually opening the selenium server through Windows Explorer, right click on the file, choose Open with -> Java Platform SE Binary.

Took me almost 3 hours to figure it out, so I hope this helps somebody.

like image 53
sunomad Avatar answered Oct 18 '22 10:10

sunomad