firefox - 启动 Firefox 并启用 selenium ide

标签 firefox selenium selenium-webdriver

我想在启用 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/

相关文章:

javascript - 将 Components.classesByID 替换为 document.implementation.createDocument

python - 无法弄清楚 Selenium - 无法找到元素

java - 如何使用 Selenium WebDriver 克服 SSL 证书

python - 从 href 标签中提取 html selenium webscraper

firefox - 使用 GeoLocate 进行 Selenium 测试 - FireFox 不断将其关闭

javascript - 从 Firefox 4 开始,正则表达式抛出 ""Regular expression too complex"错误

css - 15 像素处 Firefox 和 Chrome 中 Verdana 的字距错误

python - 如何让 Selenium 在单选按钮python上进行随机选择

javascript - 通过 Selenium 和 Python 通过 WebDriver 实例调用 execute_script() 方法时 arguments[0] 是什么?

firefox - Selenium Webdriver 测试期间的多个 Firefox 实例无法正确处理焦点。