protractor-styleguide icon indicating copy to clipboard operation
protractor-styleguide copied to clipboard

Add section about helpers

Open CarmenPopoviciu opened this issue 9 years ago • 0 comments

eg:

this.blur = function () { return function () { var body = element(by.css('body')); body.click(); }; };

or

this.isDisplayed = function (element) { return function () { return element.isPresent().then(function (isPresent) { if (isPresent) { return element.isDisplayed(); } return false; }); }; };

CarmenPopoviciu avatar Apr 07 '15 14:04 CarmenPopoviciu