Skip to content

I can't get selenium-webdriver (Javascript) with chromedriver working on Mac OSX #3148

@posti85

Description

@posti85

Meta -

OS: Mac OSX

Selenium Version: 3.0.1 (Javascript API)

Browser: Google Chrome

Browser Version: 54.0.2840

Expected Behavior -

Open Google's web page and write something in the input field.

Actual Behavior -

Google's web page opens, but nothing is written (the get call doesn't finish).

Steps to reproduce -

Copy & paste from my stackoverflow question: http://stackoverflow.com/questions/40664398

I'm trying to do some functional testing using selenium-webdriver in Google Chrome navigator on Mac OSX, but I have problems while trying to interact with the navigator.

I've simplified the problem into a similar one: I need to open the Google main page and write something in its input, so I execute this node script:

require('chromedriver');

var webdriver = require('selenium-webdriver'),
    By = webdriver.By,
    until = webdriver.until;

var driver = new webdriver.Builder()
    .forBrowser('chrome')
    .build();

driver.get('http://www.google.com/ncr');
driver.findElement(By.name('q')).sendKeys('webdriver');

The npm dependencies are:

npm install selenium-webdriver chromedriver

The results of the execution are: the Google Chrome browser opens (so the chromedriver seems to work), but the input field isn't written, because the get call never finishes executing. So the browser can load a given web page but after that I can't interact with it.

Of course, I've also tried to download and install manually the chromedriver, locating the binary file in /usr/local/bin and chmod +x it, but the result is the same.

However, if I try the same in Safari (removing the first require line and using 'safari' for browser instead of 'chrome') it works! But I need to test it in Google Chrome!

Also, I have tryied the same example using Java and Google Chrome, and it works! It's a problem related with the selenium webdriver Javascript implementation? Or its integration with chromedriver...?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-nodejsJavaScript Bindings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions