IntelliJ - navigate to external Url not working - throws an error

Hi Friends,

This is the first time I am posting a question to this forum. I tried to include as many details as possible here.
I am using IntelliJ IDEA for selenium automation. I am trying to automate below test cases as follows.

  1. Login to and search JBL Speakers.
  2. From navigate to Simplilearn website and navigate back to

I was using the method " driver.navigate().to(“Simplilearn”) ". The first use case got executed, but second use case of navigating from to Simplilearn failed.

The program stops executing and throws an error message - Starting ChromeDriver 81.0.4044.138 (8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}) on port 9252
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

I am using Windows 10 Home edition
Chrome browser Version 81.0.4044.138 (Official Build) (64-bit) and chrome driver 81.0.4044 IntelliJ IDEA 2020.1.1 community edition.

Below is the program I am trying to execute:

package com.Selenium_ICT_intellij;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class ebaySearch {
WebDriver driver;

public void launchBrowser(){
    System.setProperty("", "C:Path to chromedriver.exe");
    driver = new ChromeDriver();

public void searchProduct() throws InterruptedException {
    driver.findElement("gh-ac")).sendKeys("JBL Speakers");

public void navigateUrl() throws InterruptedException {

public static void main (String args[]) throws InterruptedException {
    ebaySearch obj = new ebaySearch();


Screenshot of Error message:

In all honesty this doesn’t seem as an error. I know it is red, but that is IntelliJ not adhering to normal colour schemes.

And the message should be informational message only. What the message is telling you is that the chromedriver only accepts connections from the local machine. So you cannot give chromdriver commands from outside.


Maybe it’s better to forward it to

1 Like

Hi @ravishankarste , trying to reproduce the issue i see that element locator for “Deals” -> driver.findElement(By.linkText(“Deals”)).click();
report the error:
Exception in thread “main” org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {“method”:“link text”,“selector”:“Deals”}

Maybe try to locate the element with other locator method helps.

1 Like

Thank you Zejnilovic.

Thank you Milan… I think that is the problem and so the code after that also does not work. It stops there and quits.