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).

Community
  • 1
  • 1
codemon
  • 1,456
  • 1
  • 14
  • 26
  • 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. – JeffC Nov 07 '16 at 03:02
  • Thanks, but i have the latest version of chrome, webdriver, and chromedriver. – codemon Nov 07 '16 at 18:48

0 Answers0