From c03bd13dd5c79a3836300f45f55db1dce4135b3e Mon Sep 17 00:00:00 2001 From: Adam Albright Date: Tue, 9 Dec 2025 15:53:42 -0700 Subject: [PATCH] Bug fix for waitForFunction --- src/Playwright/Page.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Playwright/Page.php b/src/Playwright/Page.php index d97f3db3..468e40a4 100644 --- a/src/Playwright/Page.php +++ b/src/Playwright/Page.php @@ -254,14 +254,13 @@ public function waitForFunction(string $content, mixed $arg = null): self { $params = [ 'expression' => $content, + 'isFunction' => true, 'arg' => JavaScriptSerializer::serializeArgument($arg), ]; - Client::instance()->execute( - $this->guid, - 'waitForFunction', - $params - ); + $response = $this->sendMessage('waitForFunction', $params); + + $this->processVoidResponse($response); return $this; }