Javascript 使用配置文件路径打开firefox[selenium webdriver NodeJS]
我正在尝试在firefox中打开默认配置文件。 我试过使用:Javascript 使用配置文件路径打开firefox[selenium webdriver NodeJS],javascript,node.js,selenium,selenium-webdriver,geckodriver,Javascript,Node.js,Selenium,Selenium Webdriver,Geckodriver,我正在尝试在firefox中打开默认配置文件。 我试过使用: options.setProfile(path); 但它不起作用 我已使用options.addArguments()打开配置文件,但无法控制它。 它给出“权限被拒绝”或“连接已关闭” 我在windows 10上使用“selenium webdriver 4.0.0-alpha.5”和“firefox 78.0.1(64位)”我使用的是: const {Builder} = require('selenium-webdriver')
options.setProfile(path);
但它不起作用
我已使用options.addArguments()
打开配置文件,但无法控制它。
它给出“权限被拒绝”或“连接已关闭”
我在windows 10上使用“selenium webdriver 4.0.0-alpha.5”和“firefox 78.0.1(64位)”我使用的是:
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();
希望能有所帮助