Skip to content

Commit 3dae3f6

Browse files
committed
wip
1 parent e836ca9 commit 3dae3f6

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/Playwright/Locator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ public function getAttribute(string $name): ?string
282282
*/
283283
public function waitFor(?array $options = null): void
284284
{
285-
$this->sendMessage('waitForSelector', $options ?? []);
285+
$response = $this->sendMessage('waitForSelector', $options ?? []);
286+
287+
$this->processVoidResponse($response);
286288
}
287289

288290
/**

tests/Browser/Playwright/Locator/WaitForTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
declare(strict_types=1);
44

5+
use PHPUnit\Framework\ExpectationFailedException;
6+
57
it('throws an expectation failed exception when the element is not visible', function (): void {
68
$page = page()->goto('/test/element-tests');
79

810
$locator = $page->locator('input[name="404"]');
911

1012
$locator->waitFor();
11-
});
13+
})->throws(ExpectationFailedException::class);

0 commit comments

Comments
 (0)