You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that you have done your waiting in JS in a Promise.all, which fires both requests simultaneously.
In the perl you are clicking the link that executes navigation, and then waiting.
I suspect if you do your wait before the click, and then await the promise like so:
my $promise = $page->waitForNavigation({ waitUntil => "domcontentloaded" }));
$page->click('text="Go to file"');
$pw->await($promise);
In summary, because perl is not an event-driven language like javascript, you have to handle things slightly differently than you would expect. From a technical point of view, this is not actually any different than what is going on in JS -- you have to set up the relevant listener before the required event happens, or a timeout will occur. Promise.All simply allows you to not feel that pain.
I can on the other hand say with confidence that it would be valuable and a good user experience to implement a similar capability to promise.All which may be used to abstract away such akwardness. Reopening as a feature request along those lines.
Using waitForNavigation after a click always times-out.
Here's an example:
This is based on a JS playwright test script which does the following:
The text was updated successfully, but these errors were encountered: