Created
June 3, 2012 07:50
-
-
Save kyamaguchi/2862510 to your computer and use it in GitHub Desktop.
extending drag with capybara
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module CapybaraExtension | |
| def drag_by(right_by, down_by) | |
| base.drag_by(right_by, down_by) | |
| end | |
| end | |
| module CapybaraSeleniumExtension | |
| def drag_by(right_by, down_by) | |
| resynchronize { driver.browser.action.drag_and_drop_by(native, right_by, down_by).perform } | |
| end | |
| end | |
| ::Capybara::Selenium::Node.send :include, CapybaraSeleniumExtension | |
| ::Capybara::Node::Element.send :include, CapybaraExtension | |
| include Integral::Selenium |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment