How to doubleClick() an element in protractor ?
>> In protractor we can double click an element (button,text etc.,.) using doubleClick() method which is provided in actions().
Please check below code script:
First write xpath with help of DOM
Here we have 1 button welcome, when we double click that button, a message will display under that button how many times we have clicked the button.
describe('Protractor - doubleClick()', function () {
it('Code script to use doubleClick() in protractor', function () {
browser.get("https://keeplearners.blogspot.com/2018/03/Angular-elements.html");
var doubleClickButton = element(by.css("button#doubleClick"));
browser.actions().doubleClick(doubleClickButton).perform();
});
});
No comments:
Post a Comment
Please comment below to feedback or ask questions.