我必须编写脚本,在其中安装名为“aqqin”的 firefox-add-on。我该怎么做
最佳答案
您可以通过创建自定义配置文件并将其传递给驱动程序来添加插件。
FirefoxProfile profile = new FirefoxProfile();
File extension = new File("<path>"/aqqin.xpi");
profile.addExtension(extension);
WebDriver driver = new FirefoxDriver(profile);
关于selenium - 如何在 cucumber 测试用例中使用 Selenium Web 驱动程序安装 Firefox 的附加组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15493392/