Skip to content

Commit

Permalink
feat: update name
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Oct 9, 2023
1 parent 9bf2140 commit 0448d18
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/macaca-playwright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Playwright extends DriverBase {
newContextOptions = {};
frame = null;
page = null;
popup = null;
pagePopup = null;
locator = null; // 当前选中的 element
atoms = [];
pages = [];
Expand Down Expand Up @@ -91,10 +91,9 @@ class Playwright extends DriverBase {
this.page = this.pages[index];
// Get all popups when they open
this.page.on('popup', async (popup) => {
// 提前置空,防止取到缓存
this.popup = null;
this.pagePopup = null;
await popup.waitForLoadState();
this.popup = popup;
this.pagePopup = popup;
});
return index;
}
Expand Down

0 comments on commit 0448d18

Please sign in to comment.