Skip to content

Instantly share code, notes, and snippets.

@rohitkadam19
Last active December 19, 2015 04:49
Show Gist options
  • Save rohitkadam19/5900246 to your computer and use it in GitHub Desktop.
Save rohitkadam19/5900246 to your computer and use it in GitHub Desktop.
Drag and drop doesn't work with selenium 2.33 and firefox 21.0
require 'selenium-webdriver'
browser = Selenium::WebDriver.for :firefox
browser.get 'http://example.com'
a = browser.find_element(:xpath, "//div[@labelname='Label 1']/div")
b = browser.find_element(:id, 'labelList')
browser.action.drag_and_drop(a, b).perform
# Output
# This does not perform any action and also does not return any error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment