Node.js NodeJS selenium驱动程序geckodriver普通Firefox
我正在为NodeJS使用selenium驱动程序中的geckodriver。我希望geckodriver发布的Firefox是普通的Firefox(扩展名、FF帐户、历史记录、cookies、地址栏等)。有没有办法用geckodriver做到这一点Node.js NodeJS selenium驱动程序geckodriver普通Firefox,node.js,selenium,selenium-webdriver,firefox,geckodriver,Node.js,Selenium,Selenium Webdriver,Firefox,Geckodriver,我正在为NodeJS使用selenium驱动程序中的geckodriver。我希望geckodriver发布的Firefox是普通的Firefox(扩展名、FF帐户、历史记录、cookies、地址栏等)。有没有办法用geckodriver做到这一点 您不能在gekodriver中禁用自动符号 但您仍然可以将firefox配置文件用作: 首先创建一个配置文件,然后选择该配置文件并登录到站点。这会将cookies存储到该配置文件中。现在使用该配置文件 键入about:profiles并单击cre
您不能在gekodriver中禁用自动符号 但您仍然可以将firefox配置文件用作: 首先创建一个配置文件,然后选择该配置文件并登录到站点。这会将cookies存储到该配置文件中。现在使用该配置文件 键入about:profiles并单击create profile,创建后单击launch browser with profile并在新浏览器中登录到该网站。现在会话将保存在该配置文件中 现在,您可以在代码中使用此配置文件: 您可以将此firefox配置文件用作:
const {Builder} = require('selenium-webdriver');
const firefox = require('selenium-webdriver/firefox');
let options = new firefox.Options();
let profile = 'path';
options.setProfile(profile);
let driver = new Builder()
.forBrowser('firefox')
.setFirefoxOptions(options)
.build();