【问题标题】:Tell Cucumber tests to run on https告诉 Cucumber 测试在 https 上运行
【发布时间】:2011-07-27 23:32:02
【问题描述】:

我在使用 Selenium 的外部模式下使用 Webrat 运行黄瓜测试。在生产中,我们在 https 后面运行,因此我们需要在 https 上运行我们的黄瓜测试。

有什么地方可以指定 cucumber、webrat 或 selenium 需要使用 https 吗?理想情况下,这可以通过提供给 Webrat 的参数来指定。

我看到一些东西,如果我覆盖捆绑在 selenium.rb 文件下的默认 SeleniumClientDriver,它可能是可能的。

env.rb =>

Webrat.configure do |config|
    config.mode = :selenium
    config.aplication_address = 'localhost'
    config.aplication_port = 11090
    config.selenium_server_address = 'localhost'
    config.selenium_server_port = 4444
    config.selenium_browser_key = '*iexploreproxy'
    config.application_framework = :external
end

World do
    session = Webrat::SeleniumSession.new
    session.extend(Webrat::Methods)
    session.extend(Webrat::Selenium::Methods)
    session.extend(Webrat::Selenium::Matchers)
    session        
end

感谢您的帮助!

【问题讨论】:

    标签: https cucumber selenium-rc webrat


    【解决方案1】:

    这显然不是 webrat 团队决定支持的东西。

    因此,团队成员更改了源以允许可以通过 env.rb 属性指定它。拉取请求可以在here找到。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-03
      • 2021-05-05
      • 1970-01-01
      • 2017-01-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多