Capybara 水豚::Poltergeist::StatusFailError
我正在尝试使用Capybara 水豚::Poltergeist::StatusFailError,capybara,poltergeist,Capybara,Poltergeist,我正在尝试使用吹比利宝石与恶鬼一起使用,我对此有一些问题。Mycapybara\u helper.rb包含下一个代码: Billy.configure do |c| c.cache = true c.cache_request_headers = false c.path_blacklist = [] c.persist_cache = true c.ignore_cache_port = true c.non_successful_cache_disabled = fa
吹比利
宝石与恶鬼
一起使用,我对此有一些问题。Mycapybara\u helper.rb
包含下一个代码:
Billy.configure do |c|
c.cache = true
c.cache_request_headers = false
c.path_blacklist = []
c.persist_cache = true
c.ignore_cache_port = true
c.non_successful_cache_disabled = false
c.non_successful_error_level = :warn
c.non_whitelisted_requests_disabled = false
end
我的测试是:
scenario 'Add new address', driver: :poltergeist_billy do
proxy.stub("https://maps.googleapis.com/maps/api/js?callback=window.initializeGmaps&key=#{MyApiKeyGoesHere}&libraries=places&language=en").
and_return(code: 500)
visit new_address_path
expect(page).to have_text('Service unavailable')
end
我收到一个错误:
Failure/Error: new_address_path
Capybara::Poltergeist::StatusFailError:
Request to 'http://127.0.0.1:33173/addresses/new' failed to reach server, check DNS and/or server status - Timed out with the following resources still waiting https://maps.googleapis.com/maps/api/js?callback=window.initializeGmaps&key=#{MyApiKeyGoesHere}-qk&libraries=places
如果要将驱动程序更改为selenium\u
,则错误为:
Failure/Error: example.run
Net::ReadTimeout:
Net::ReadTimeout
谢谢 它挂起的资源url与您要在puffing billy中存根的url不完全匹配-您可能希望使用正则表达式存根,以确保所有映射请求都被存根
proxy.stub(%r{^https://maps.googleapis.com/maps}).and_return(code: 500)
它挂起的资源url与您正在puffing billy中存根的url不完全匹配-您可能希望使用正则表达式存根,以确保所有映射请求都被存根
proxy.stub(%r{^https://maps.googleapis.com/maps}).and_return(code: 500)
我尝试了,收到了相同的错误,
无法到达服务器。
。我尝试了,收到了相同的错误,无法到达服务器。
。