Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I perform a double click on an element with Protractor?

I would like to double click on an element but I could not find a way to do this in the document API. I found some references dating back to 2013 but I know things have changed a lot.

Can someone help and tell me how I can perform a double click.

Thanks

like image 631
Alan2 Avatar asked Sep 17 '14 15:09

Alan2


People also ask

How do you double click on a protractor?

doubleClick(element(by.id("double-click"))). perform(); browser. actions(). mouseDown(element(by.id("drag1")).


1 Answers

Always remember that protractor is a wrapper around webdriverjs.

doubleClick() is available in browser.actions():

browser.actions().doubleClick(element(by.id('mybutton'))).perform();
like image 56
alecxe Avatar answered Sep 20 '22 04:09

alecxe