Very new with AngularJS and Protractor, but I think I am going to the right direction so far.
My site has a list of items when you click and hold the item for X seconds, it opens a modal window.
How can I simulate that behavior in Protractor/Jasmine?
I know there is the "click()" event, but I want the "click and hold" event
I am sure there is someone that knows how to simulate that.
Big thanks in advance!
The idea is to use
mouseDown()
first:Then, call
browser.sleep()
for X seconds.Then, call
mouseUp()
to release the mouse click:Code:
where
element
is a target element forclick-and-hold
.Working example (based on this jsfiddle):