Created
January 18, 2013 01:32
-
-
Save JonRowe/4561553 to your computer and use it in GitHub Desktop.
The Drag & Drop Challenge.... Can you automate this? I can't... Have tried: phantomjs, capybara-webkit, selenium (firefox & chrome)...
This file contains 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
describe 'dragging and dropping', type: :js do | |
let(:manually) { page.driver.browser.action } | |
specify do | |
visit 'http://html5demos.com/drag' | |
find('#two').drag_to find('#bin') | |
#doesn't work so try... | |
Capybara.current_driver = :selenium | |
# I've tried both firefox and chrome... | |
visit 'http://html5demos.com/drag' | |
manually.click_and_hold find('#two').native | |
manually.move_by -200, 0 | |
manually.release | |
manually.perform | |
page.should_not have_css '#two' | |
#still doesn't work :( | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment