告诉黄瓜测试运行在https
问题描述:
我正在使用Selenium的外部模式下运行Webrat的黄瓜测试。在生产中,我们运行在https后面,所以我们需要在https上运行我们的黄瓜测试。告诉黄瓜测试运行在https
是否有我们可以指定黄瓜,网页或硒需要使用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
感谢您的帮助!