Reputation: 2440
While following the instructions in the 'Getting Started' section of the WebDriverJs documentation and after running this snippet from their site:
var driver = new webdriver.Builder().
withCapabilities(webdriver.Capabilities.chrome()).
build();
driver.get('http://www.google.com');
driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');
driver.findElement(webdriver.By.name('btnG')).click();
driver.wait(function() {
return driver.getTitle().then(function(title) {
return title === 'webdriver - Google Search';
});
}, 1000);
driver.quit();
I'm getting this error:
Error: Timed out waiting for the WebDriver server at http://XXX.XXX.X.XXX:60065/
at <anonymous>
at <anonymous>
at <anonymous>
at <anonymous>
at <anonymous>
at <anonymous>
at <anonymous>
at <anonymous>
at <anonymous>
at <anonymous>
==== async task ====
WebDriver.createSession()
I'm running OSX Mavericks using the mac32 version of ChromeDriver found here. The chromedriver
executable is in my /usr/local/bin
directory, and is accessible on my path
.
One thing I notice is that when I run chromedriver
from the command line, it runs on port 9515
, while the node code is looking for it on 60065
. However, there shouldn't be any extra configuration required for just running with the chromedriver
.
Would anyone have any ideas on why I'm getting this error?
Upvotes: 8
Views: 9672
Reputation: 1
I had this error when using new firefox.Service Builder('/path/to/geckodriver'), this error disappeared when I added the path to geckodriver to the variable $PATH.
Upvotes: 0
Reputation: 653
For me what worked was being on version 78.0.33904.70
of ChromeDriver and then version of Chrome Browser 78.0.3904.87
Here is the link to get Chrome Driver: http://chromedriver.storage.googleapis.com/index.html?path=78.0.3904.70/
How to check what version of chrome you have: https://support.chall.com/hc/en-us/articles/200336349-How-do-I-determine-what-version-of-Google-Chrome-I-m-using-
Upvotes: 0
Reputation: 691
Based on @Andrej Kaurin comment:
You can set
directConnnect: true
in your protractor configuration.
When this is set, protractor connects directly with browser driver and selenium is not needed.
More details: https://github.com/angular/protractor/blob/master/docs/server-setup.md#connecting-directly-to-browser-drivers
Upvotes: 0
Reputation: 1127
I was having this exact issue today and near as I can tell it's a bug with the current version of the selenium-webdriver
package (2.41.0).
There is a bug filed with the Selenium project but I don't think the fix has made its way onto npm yet.
Downgrading to version 2.9.248307 of Chromedriver worked for me.
Upvotes: 8