Reputation: 61
I'm trying to open the default profile in firefox. I have tried using:
options.setProfile(path);
but it didn't work
I have managed to open the profile using options.addArguments()
but I couldn't control it.
it gives "permission denied" or "connection closed"
I'm using "selenium-webdriver 4.0.0-alpha.5" and "firefox 78.0.1 (64-bit)" on windows 10
Upvotes: 4
Views: 1511
Reputation: 529
I use this :
const {Builder} = require('selenium-webdriver');
const firefox = require('selenium-webdriver/firefox');
let options = new firefox.Options();
let profile = '/home/me/.mozilla/firefox/4p90s4py.oss';
options.setProfile(profile);
let driver = new Builder()
.forBrowser('firefox')
.setFirefoxOptions(options)
.build();
hopefully it helps
Upvotes: 2