Capybara.configure do |config|
config.run_server = false
config.default_driver = :poltergeist
config.app_host = 'http://localhost:9292'
end
根据Poltergeist docs的说法,向初步的拓博者提供选项:
options = { timeout:0 }
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, options)
end
所以,我没有应用程序传递给Poltergeist init。如何在没有应用程序的情况下进行设置?
以下 不 设置选项:
options = { timeout:0 }
Capybara.register_driver :poltergeist do
Capybara::Poltergeist::Driver.new( options )
end
答案 0 :(得分:4)
我认为,这应该有效:
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, timeout: 30)
end