From 51efa012c7413d0d62feb9d0cf900c1b4aa5f9d3 Mon Sep 17 00:00:00 2001
From: Matthew Forth <31514505+mattyforth@users.noreply.github.com>
Date: Thu, 2 Apr 2026 12:16:01 +0100
Subject: [PATCH 1/2] chore: correct withinFrame method name
---
browser-testing.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/browser-testing.md b/browser-testing.md
index e3f8faa..8841786 100644
--- a/browser-testing.md
+++ b/browser-testing.md
@@ -346,7 +346,7 @@ $page->assertSee('Welcome to Some Subdomain');
[hover](#hover)
[submit](#submit)
[value](#value)
-[withinIframe](#within-iframe)
+[withinFrame](#within-frame)
[resize](#resize)
[script](#script)
[content](#content)
@@ -1124,16 +1124,16 @@ The `value` method gets the value of the element matching the given selector:
$value = $page->value('input[name=email]');
```
-
+
-### withinIframe
+### withinFrame
-The `withinIframe` method allows you to interact with elements inside an iframe:
+The `withinFrame` method allows you to interact with elements inside an iframe:
```php
use Pest\Browser\Api\PendingAwaitablePage;
-$page->withinIframe('.iframe-container', function (PendingAwaitablePage $page) {
+$page->withinFrame('.iframe-container', function (PendingAwaitablePage $page) {
$page->type('frame-input', 'Hello iframe')
->click('frame-button');
});
From 7098fd1889b0bc949cc69a8f44b9e1a38c50c79a Mon Sep 17 00:00:00 2001
From: Matthew Forth <31514505+mattyforth@users.noreply.github.com>
Date: Thu, 2 Apr 2026 12:23:37 +0100
Subject: [PATCH 2/2] chore: update callback method signature for withinFrame
Callback passed in to `withinFrame` actually receives an instance of `AwaitableWebpage`, not `PendingAwaitableWebpage`.
---
browser-testing.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/browser-testing.md b/browser-testing.md
index 8841786..f4b3cbd 100644
--- a/browser-testing.md
+++ b/browser-testing.md
@@ -1131,9 +1131,9 @@ $value = $page->value('input[name=email]');
The `withinFrame` method allows you to interact with elements inside an iframe:
```php
-use Pest\Browser\Api\PendingAwaitablePage;
+use Pest\Browser\Api\AwaitableWebpage;
-$page->withinFrame('.iframe-container', function (PendingAwaitablePage $page) {
+$page->withinFrame('.iframe-container', function (AwaitableWebpage $page) {
$page->type('frame-input', 'Hello iframe')
->click('frame-button');
});