Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

protractor double click in a specific location

I'm developing a system (with AngularJS) that has a feature that is invoked by double clicking in a place on a web page and then I get the coordinates of the mouse and do what I want.

I'm trying to do e2e testing using protractor and I can't find any information on how to simulate the double click and get the location back.

Does anyone have an idea about this?

Thanks!

like image 447
Menshawi Avatar asked Oct 28 '13 09:10

Menshawi


2 Answers

You can do this with a WebDriver ActionSequence, but you have to tell it where to click instead of getting the location back:

browser.actions().mouseMove({x: 50, y: 50}).doubleClick().perform()

like image 73
Jmr Avatar answered Sep 20 '22 09:09

Jmr


browser.actions().doubleClick(myElement).perform()
like image 42
user3218881 Avatar answered Sep 22 '22 09:09

user3218881