Answer the question
In order to leave comments, you need to log in
Why isn't my Google (Selenium) profile loading?
I went into Chrome in my Google account (think, I opened the browser with my own hands and did it), but if I run Selenium with Chrome, then I didn’t log into my account. How so?
I take a screenshot, and there is the login button on the top right, from it I understand that the profile didn’t work
const {Builder, By} = require('selenium-webdriver');
const firefox = require('selenium-webdriver/chrome');
const until = require('selenium-webdriver/lib/until');
const screen = {
width: 1240,
height: 720
};
let option = new firefox.Options().addArguments("user-data-dir=C:\\Users\\Kulic\\AppData\\Local\\Google\\Chrome\\User Data\\Default").headless().windowSize(screen);
let driver = new Builder()
.forBrowser('chrome')
.setChromeOptions(option)
.build();
let adidas_url = "http://www.google.com";
driver.get(adidas_url)
.then(() => {
setTimeout(() => {
driver.takeScreenshot()
.then(
function(image, err) {
require('fs').writeFile('out.png', image, 'base64', function(err) {
console.log(err);
});
driver.quit();
}
);
}, 4000);
});
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