Skip to content

Commit

Permalink
fix: 增强execute方法执行稳定性 (#54)
Browse files Browse the repository at this point in the history
* chore: 增强执行稳定性

* chore: 更新版本
  • Loading branch information
yihuineng authored Oct 17, 2024
1 parent 7df4508 commit 9a32b65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const sendJSCommand = async function(script) {

let res;
await implicitWaitForCondition.call(this, async () => {
await (this.pageIframe || this.page).waitForLoadState();
res = await (this.pageIframe || this.page).evaluate(command);
await (this.pageIframe || this.page).waitForLoadState();
return !!res;
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "macaca-playwright",
"version": "1.12.0",
"version": "1.12.1",
"description": "Macaca Playwright driver",
"keywords": [
"playwright",
Expand Down

0 comments on commit 9a32b65

Please sign in to comment.