Skip to content

Instantly share code, notes, and snippets.

@jarib
Created December 7, 2011 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jarib/1444585 to your computer and use it in GitHub Desktop.
Save jarib/1444585 to your computer and use it in GitHub Desktop.
jquery ui sortable w/ webdriver
require 'selenium-webdriver'
pr = Selenium::WebDriver::Firefox::Profile.new
pr.native_events = true
d = Selenium::WebDriver.for :firefox, :profile => pr
d.get "http://jqueryui.com/demos/sortable/"
list = d.find_element(:id, 'sortable').find_elements(:tag_name, 'li')
d.action.drag_and_drop_by(list[0], 0, 200).perform
sleep 2
d.quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment