I am trying to automate an HTML webpage which requires me to drag an image map area element by 50 pixels to the right and then release the click.

I tried various techniques, like using an Actions class drag and drop function (also a series of actions like moveToElement > clickAndHold > moveByOffset > release). I also tried to execute a javascript drag drop and Robot class too, all I was able to do was locate and click the area element, I was also able to retrieve its HTML attributes. Although selenium would not throw an error while executing drag and drop related instructions, however elements are not dragged and the script would eventually fail.

  • make sure you have the correct element for the element you want to drag and what you are dragging to – mosaad Aug 31 '16 at 8:31
  • @mosaad, Html attributes that I retrieved are as expected, so I assume its locating the correct element. – Kenil Fadia Aug 31 '16 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.