Skip to content

Commit

Permalink
feat: add waitAndGetAttributeValue
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Mucha <[email protected]>
  • Loading branch information
drptbl committed Nov 1, 2022
1 parent d1e9048 commit d2ffb47
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions commands/playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ module.exports = {
const value = await element.inputValue();
return value;
},
waitAndGetAttributeValue: async (
selector,
attribute,
page = metamaskWindow,
) => {
const element = await module.exports.waitFor(selector, page);
const attrValue = await element.getAttribute(attribute);
return attrValue;
},
waitAndSetValue: async (text, selector, page = metamaskWindow) => {
const element = await module.exports.waitFor(selector, page);
await element.fill('');
Expand Down

0 comments on commit d2ffb47

Please sign in to comment.