Skip to content

Commit 9a32b65

Browse files
authored
fix: 增强execute方法执行稳定性 (#54)
* chore: 增强执行稳定性 * chore: 更新版本
1 parent 7df4508 commit 9a32b65

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/controllers.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const sendJSCommand = async function(script) {
2121

2222
let res;
2323
await implicitWaitForCondition.call(this, async () => {
24+
await (this.pageIframe || this.page).waitForLoadState();
2425
res = await (this.pageIframe || this.page).evaluate(command);
26+
await (this.pageIframe || this.page).waitForLoadState();
2527
return !!res;
2628
});
2729

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "macaca-playwright",
3-
"version": "1.12.0",
3+
"version": "1.12.1",
44
"description": "Macaca Playwright driver",
55
"keywords": [
66
"playwright",

0 commit comments

Comments
 (0)