0

''' using OpenQA.Selenium.Chrome; using OpenQA.Selenium;

// to open chrome
namespace NewTest
{
    class EntryPoint
    {
        static void Main()
        {

            IWebDriver driver = new ChromeDriver();

            driver.Navigate().GoToUrl("http://google.com");

        }

    }
}'''

The message is

Starting ChromeDriver 76.0.3809.68 (420c9498db8ce8fcd190a954d51297672c1515d5-refs/branch-heads/3809@{#864}) on port 58630
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Keet Sugathadasa
  • 11,595
  • 6
  • 65
  • 80
Noeghi
  • 21
  • 2

2 Answers2

0

Updating Chrome driver resolved the issue http://chromedriver.chromium.org/downloads

  • Starting ChromeDriver 77.0.3865.40 . with Chrome Version 77.0.3865.120 (Official Build) (64-bit) and i still get the same issue. Only local connections are allowed. The Chrome browser does not open. – Noeghi Oct 22 '19 at 07:33
0

If your Chromedriver only shows the above three messages (as per the question), then there is a problem. It has to show a message like this, which says it started successfully.

Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.

To troubleshoot this...

Step 1: Check your Chromedriver version

$ chromedriver --version

ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416})

My version is 83.0.4103.39.

Step 2: Check your Chrome Browser version

Open Google Chrome.

Options --> Help --> About Google Chrome

enter image description here

Or open a terminal and run the following command (works on Ubuntu).

$ google-chrome --version

Google Chrome 83.0.4103.61

My version is: Version 83.0.4103.61

Step 3: Compare versions of Chromedriver and Google Chrome

Both these versions are starting with 83, which means they are both compatible. Hence, you should see a message like below, when you run the below command.

$ chromedriver 

Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully. 

If your versions mismatch, then you will see the following message. You will not see the line which says, ChromeDriver was started successfully..

$ chromedriver

Starting ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}) on port 9515
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

Step 4: Download the correct version of Chromedriver

Download the correct version that matches your browser version. Use this page for downloads. After you download, extract the content, and move it to one of the following two folders. Open each of the following two folders and see whether your current Chromedriver is there. If it is on both folders, replace both. And do STEP 3 again.

/usr/bin/chromedriver
/usr/local/bin/chromedriver
Keet Sugathadasa
  • 11,595
  • 6
  • 65
  • 80