Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Only local connections are allowed Chrome and Selenium webdriver

I am using Chrome webdriver 2.23 & Selenium 2.53.1. I have tried a lot, but could not get it fixed. Whenever I run my selenium script, it is giving me the following error

Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 12162 Only local connections are allowed. 
like image 838
Sanwal Riaz Avatar asked Aug 09 '16 08:08

Sanwal Riaz


People also ask

Does Selenium only work with Chrome?

No, Google Chrome does not work with Selenium IDE. As Selenium IDE is a Firefox plugin it works only with FF.

Can ChromeDriver work without Chrome?

The answer is No. You have to have the chrome application inside your computer.

How do I integrate a Chrome driver using Selenium?

Go to the terminal and type the command: sudo nano /etc/paths. Enter the password. At the bottom of the file, add the path of your ChromeDriver. Type Y to save.


1 Answers

This is just an informational message. Your issue might be a missmatch between the versions of chromedriver and selenium-server-standalone.

Try with the latest selenium version 3.0, it is working for me.

Please not that for selenium 3.0 you need to specify the driver first and after the selenium server.

With the new selenium, which is 3.0 you should use:

java -Dwebdriver.chrome.driver=path_to_chrome_driver -jar selenium-server-standalone-3.0.0-beta2.jar If you are using selenium version below 3.0 you need to reverse the order of selenium with the driver, like:

java -Dwebdriver.chrome.driver=path_to_chrome_driver -jar selenium_server.jar 

When you are starting the selenium server, open a console in the directory with chromedriver and selenium server and execute the above command.

like image 86
lauda Avatar answered Sep 19 '22 12:09

lauda