Merge pull request #1995 from dnrce/selenium-scrolling

Selenium: scroll elements to bottom instead of top
This commit is contained in:
Matt Rogers 2016-02-16 09:08:55 -06:00
commit 91849c5316

View file

@ -17,8 +17,12 @@ end
if Capybara.javascript_driver == :selenium
profile = Selenium::WebDriver::Firefox::Profile.new
profile['intl.accept_languages'] = 'en'
capabilities = Selenium::WebDriver::Remote::Capabilities.firefox
capabilities['elementScrollBehavior'] = 1
Capybara.register_driver :selenium_english do |app|
Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile)
Capybara::Selenium::Driver.new(app, browser: :firefox, profile: profile, desired_capabilities: capabilities)
end
Capybara.javascript_driver = :selenium_english
end