How to skip image loading using selenium webdriver for cucumber test cases. My test cases are failing due to image is not loading properly. a spinner a rolling when i see in Net tab in firebug.
FirefoxDriver supports loading strategy that doesn't require page to fully load. Thus driver will return without waiting for images to 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With