【问题标题】:Selenium Standalone + Chrome driver, add capabilities from command lineSelenium Standalone + Chrome 驱动程序,从命令行添加功能
【发布时间】:2014-12-17 00:54:47
【问题描述】:

我想在 Google Chrome 上使用 selenium 独立服务器运行一些测试,但我需要从命令行将一些 ChromeOptions 传递给 chrome 驱动程序

有人知道我该怎么做吗?

【问题讨论】:

  • 为什么是命令行?
  • 因为我想在没有一行代码的情况下运行测试!像这样:java -jar ./selenium-server-2.42.2.jar -htmlSuite "*googlechrome" http://www.example.com TestSuit.html result.html
  • TestSuit.html 仍然是代码!

标签: google-chrome selenium selenium-rc


【解决方案1】:

您所指的 Selenium Core 是在 Chrome 出现之前发布的。稍后添加了对 Chrome 的支持。您所要求的从未得到支持,而且几年前已弃用 Selenium Core,它可能永远不会得到支持。

一种可能的解决方法是在 Chrome 配置文件中设置所需的选项。

另一个选择,虽然更痛苦,是move up to Selenium WebDriver

【讨论】:

    猜你喜欢
    • 2015-11-13
    • 2016-06-21
    • 1970-01-01
    • 1970-01-01
    • 2014-09-20
    • 2017-03-10
    • 2022-01-28
    • 1970-01-01
    • 2022-11-21
    相关资源
    最近更新 更多