UNPKG

cucumber-protractor

Version:

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

9 lines (8 loc) 384 B
module.exports = function checkElementInsideElementVisibility(locatorKey2, locatorKey, visibleOrHidden) { const currentPage = this.getCurrentPage(); return currentPage .getElementWhenInDOM(locatorKey, locatorKey2) .then(() => (visibleOrHidden === 'hidden' ? currentPage.getElementWhenInvisible(locatorKey) : currentPage.getElementWhenVisible(locatorKey))); };