我想在启用 Selenium IDE 的情况下启动 Firefox,这样我就可以在测试运行结束的地方继续编写脚本。这是我目前正在使用的代码:
FirefoxProfile profile = new FirefoxProfile();
try {
File seleniumide = new File("C:\\Downloads\\selenium-ide-2.8.0.xpi");
profile.addExtension(seleniumide);
} catch(IOException e) {
e.printStackTrace();
}
FirefoxDriver driver = new FirefoxDriver(profile);
但是,当我运行此 Firefox 时,它会打开,但不会显示启动 Selenium IDE 的按钮。有什么想法吗?
最佳答案
刚刚在网上找到了这个解决方案。
https://code.google.com/p/selenium/issues/detail?id=7388
您必须通过重命名为 .zip 并仅提取 selenium-ide.xpi 文件来解压 xpi 文件。使用此文件的路径来设置您的个人资料。
关于firefox - 启动 Firefox 并启用 selenium ide,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28288157/