From 9a32b65ac41c1c7b0b4e8a73c75f99ae2b6e5e33 Mon Sep 17 00:00:00 2001 From: SmartBear <471110230@qq.com> Date: Thu, 17 Oct 2024 16:35:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=BC=BAexecute=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=89=A7=E8=A1=8C=E7=A8=B3=E5=AE=9A=E6=80=A7=20(#54)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 增强执行稳定性 * chore: 更新版本 --- lib/controllers.js | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/controllers.js b/lib/controllers.js index 39f15fb..471cf3b 100644 --- a/lib/controllers.js +++ b/lib/controllers.js @@ -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; }); diff --git a/package.json b/package.json index 3eed06c..7431028 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "macaca-playwright", - "version": "1.12.0", + "version": "1.12.1", "description": "Macaca Playwright driver", "keywords": [ "playwright",