Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No connection could be made because the target machine actively refused it. connect(2) for "127.0.0.1" port 9515 (Errno::ECONNREFUSED)

While running my simple selenium automation script on chrome broswer, i am getting below mentioned error. The script runs fine on firefox browser. Mine is HTTPS website.

No connection could be made because the target machine actively refused it. - connect(2) for "127.0.0.1" port 9515 (Errno::ECONNREFUSED)

IDE: Ruby Mine 7.1.4 Chrome Browser: 54.0.2840.71 m (64-bit)

Script:

require "selenium/webdriver"

driver = Selenium::WebDriver.for :chrome
driver.get('http://google.com')
like image 625
Pankaj Sharma Avatar asked Feb 05 '23 20:02

Pankaj Sharma


1 Answers

I had same problem as yours after Windows Update last time. I updated chromedriver.exe from v2.9 to v2.24 and put it on bin directory where ruby installed, then it's fixed.

like image 72
athts Avatar answered May 12 '23 00:05

athts