Skip to content

Commit

Permalink
refactor: waitAndGetValue
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Mucha <[email protected]>
  • Loading branch information
drptbl committed Sep 8, 2022
1 parent 894ec47 commit 268ed4e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions commands/playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@ module.exports = {
await element.type(value);
},
waitAndGetValue: async (selector, page = metamaskWindow) => {
await module.exports.waitFor(selector, page);
const element = await page.$(selector);
const property = await element.getProperty('value');
const value = await property.jsonValue();
const element = await module.exports.waitFor(selector, page);
const value = await element.inputValue();
return value;
},
waitAndSetValue: async (text, selector, page = metamaskWindow) => {
Expand Down

0 comments on commit 268ed4e

Please sign in to comment.