如何使用硒webdriver跳过图像加载黄瓜测试用例.我的测试用例由于图像加载不正确而失败.当我在firebug的Net标签中看到时,一个旋转器滚动. 最佳答案 FirefoxDriver支持
loading strategy that doesn’t require page to fully load.因此驱动程序将返回而无需等待加载图像:
Capybara.register_driver :firefox do |app|
profile = Selenium::WebDriver::Firefox::Profile.new
profile['webdriver.load.strategy'] = 'unstable'
Capybara::Selenium::Driver.new(app, :browser => :firefox, profile: profile)
end
Capybara.default_driver = :firefox