Skip to content

Commit

Permalink
fix: close popup with click on background
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Mucha <[email protected]>
  • Loading branch information
drptbl committed Sep 26, 2022
1 parent 612f932 commit dd13339
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion commands/metamask.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ module.exports = {
.metamaskWindow()
.$(mainPageElements.popup.container)) !== null
) {
await playwright.waitAndClick(mainPageElements.popup.closeButton);
const popupBackground = playwright
.metamaskWindow()
.locator(mainPageElements.popup.background);
const popupBackgroundBox = await popupBackground.boundingBox();
await playwright
.metamaskWindow()
.mouse.click(popupBackgroundBox.x + 1, popupBackgroundBox.y + 1);
}
return true;
},
Expand Down

0 comments on commit dd13339

Please sign in to comment.