Reputation: 21
I want to pause between performing mouse-down and mouse-move action. In my functionality i need to hold mouse down for 500ms and then move, is there any option to pause for 500ms after mousedown event and then move. I already applied browser.sleep()
Upvotes: 2
Views: 1431
Reputation: 865
I had the same problem. Here is how I solved it (not the cleanest, but not sure how else):
CoffeeScript:
browser.actions().mouseDown($('#someElement')).perform().then (element) ->
browser.sleep(500).then ->
browser.actions().mouseMove($('body')).perform()
Note actions()
and perform()
are used twice - mouseDown()
, mouseMove()
and mouseUp()
are only exposed through WebDriver.ActionSequence
Upvotes: 1