Skip to content

Commit

Permalink
Added the utils.js file
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebyt committed Dec 3, 2021
1 parent 2a44eaf commit 4753c86
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/helpers/utils.js
@@ -0,0 +1,17 @@
const pinCodePage = require('../pageObjects/pinCode.screen');

async function enterPinCode(pinCode) {
for (const pinNumber of pinCode) {
await pinCodePage.getPinKey(pinNumber).click();
}
}

async function isChecked(element) {
await driver.setImplicitTimeout(300);
const result = await element.getAttribute('checked');
console.log(`Element is checked: ${result}`);

return result === 'true';
}

module.exports = {enterPinCode, isChecked};

0 comments on commit 4753c86

Please sign in to comment.