Answer the question
In order to leave comments, you need to log in
How to run 2 Chrome drivers in one profile on Selenium NodeJS?
I am writing tests, for speed I want the user to be already authorized (+ data is loaded into the local store).
import * as webdriver from 'selenium-webdriver';
import * as Chrome from 'selenium-webdriver/chrome';
var options = new Chrome.Options();
options.addArguments('--user-data-dir=C:\\profilepath');
var driver = new webdriver.Builder().withCapabilities(options.toCapabilities()).build();
driver.get("http://site.ru/").then(() => {
console.log('Opened');
}, (err) => {
console.log('Err', err);
});
var driver2 = new webdriver.Builder().withCapabilities(options.toCapabilities()).build();
driver2.get("http://site.ru/").then(() => {
console.log('Opened');
}, (err) => {
console.log('Error', err);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question