Only local connections are allowed Chrome & Seleni

2019-01-09 06:28发布

I am using Chrome webdriver 2.23 & Selenium 2.53.1 I have tried a lot but could not come the fix for this issue that whenever i run my selenium script it is giving me error

Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 12162 Only local connections are allowed.

10条回答
霸刀☆藐视天下
2楼-- · 2019-01-09 06:51

I followed my frnd suggestion and it worked like a gem for me:

Working Code:

1) Downloaded chromedriver.

2) Code is

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

public class Sel {
  public static void main(String[] args) {
    // TODO Auto-generated method stub
    System.setProperty("webdriver.chrome.driver", "C:\\Users\\Downloads\\chromedriver_win32\\chromedriver.exe"); // path of chromedriver 
    WebDriver driver = new ChromeDriver();

      driver.get("https://google.ca");
      driver.manage().window().maximize();
      driver.getTitle();

  }
}
查看更多
叼着烟拽天下
3楼-- · 2019-01-09 06:52

Sorry for late post but still for info,I also facing same problem so I Used updated version of chromedriver ie.2.28 for updated chrome browser ie. 55 to 57 which resolved my problem.

查看更多
该账号已被封号
4楼-- · 2019-01-09 06:59

I was also getting the same issue. I resolved this issue by updating the chromedriver. So if anyone is facing same issue with chrome browser just update your chromedriver.

查看更多
老娘就宠你
5楼-- · 2019-01-09 07:02

For me, updating the chromedriver and selenium version removed this message.

However, this is not an actual error and just an informational message. If your program is still passing with exit code 0 at the end even when this message is printed, it means the execution went fine.

查看更多
登录 后发表回答