【发布时间】: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