UNPKG

cucumber-protractor

Version:

POM CukeTractor - Bootstrap your cucumber tests with cucumber, protractor and a structured way of creating page objects and component objects

12 lines (10 loc) 456 B
module.exports = function checkInputValue(locatorKey, isNot, expectedVal) { const expectedValue = expectedVal === undefined ? '' : expectedVal; return this.getCurrentPage().getElementWhenInDOM(locatorKey) .then((el) => { const elValuePromise = el.getAttribute('value'); return isNot ? expect(elValuePromise).to.not.eventually.equal(expectedValue) : expect(elValuePromise).to.eventually.equal(expectedValue); }); };