【发布时间】:2017-12-30 18:50:44
【问题描述】:
在 selenium webdriver 中运行我的 java 脚本时,我能够在 FF 上看到插件(browsec VPN)图标,但在 FF 实例上始终禁用 VPN 插件 - 我已使用以下代码访问插件;
WebDriver driver = null;
FirefoxProfile profile = new FirefoxProfile();
File addonpath = new File("addonpath");
profile.addExtension(addonpath);
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.PROFILE, profile);
capabilities.setCapability("browsec", true);
driver = new FirefoxDriver(profile);
driver.get("application url");
Thread.sleep(3000);
driver.quit();
我可以看到执行上述代码的 browsec VPN 图标,但它处于禁用形式,我的问题是如何使用 selenium webdriver 启用它。谢谢
【问题讨论】:
标签: java selenium-webdriver firefox-addon automated-tests vpn