mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Merge pull request #1995 from dnrce/selenium-scrolling
Selenium: scroll elements to bottom instead of top
This commit is contained in:
commit
91849c5316
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue