Sep 17, 2025
0
Level 1
Laravel console dusk Within Frame click not working
Hi, I’m running into an issue with Laravel Dusk when trying to click a button inside an iframe.
Here’s the relevant part of my command:
$this->browse(function ($browser) {
$browser->visit('example.com')
->pressAndWaitFor('test', 5)
->withinFrame("#widget-modal", function (\Laravel\Dusk\Browser $browser) {
$browser->screenshot('before-click')
->pressAndWaitFor('Continue', 5)
->screenshot('after-click');
});
});
Problem:
The Continue button is visible inside the frame.
Both before-click and after-click screenshots still show the Continue button in the same state.
It seems like the click action is not being triggered, or Dusk is unable to properly interact with the element inside the iframe.
What I expected:
After calling pressAndWaitFor('Continue', 5), the modal or iframe content should change, but it does not.
Please or to participate in this conversation.