2

In the following topic: Load Default chrome profile with Webdriverjs Selenium, the solution listed there works fine but nothing happens when the browser is loaded, it's not loading the webpage. Here is the code:

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

var o = new chrome.Options();
o.addArguments("user-data-dir=/Users/rup/Library/Application Support/Google/Chrome/");
var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).setChromeOptions(o).build();

driver.get('http://www.facebook.com');

driver.wait(function() {
 return driver.getTitle().then(function(title) {
   console.log("title: " + title);
   return true;
 });
}, 5000);

I have the feeling it's because the "Chrome browser automation" extension isn't being loaded with that profile. I am new to webdriver so not sure how to include it, and if that would even solve the problem. i am using Webdriver JS (javascript).

2
  • Generally, if the browser launches but never navigates to the page it's a case where the driver and browser version is not sync'd. Make sure your browser and Selenium drivers are all up-to-date. Commented Nov 7, 2016 at 3:02
  • Thanks, but i have the latest version of chrome, webdriver, and chromedriver. Commented Nov 7, 2016 at 18:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.