Skip to content

await waitForNavigation times-out? #50

Open
@Deracination

Description

@Deracination

Using waitForNavigation after a click always times-out.

Here's an example:

my $pw = Playwright->new();
my $browser = $pw->launch( headless => 1, type => 'chrome' );
my $page = $browser->newPage({ viewport => { width => 2048, height => 1024 }});

$page->goto('https://github.com/teodesian/playwright-perl', { waitUntil => 'networkidle' });
$page->click('text="Go to file"');

$pw->await( $page->waitForNavigation({ waitUntil => "domcontentloaded" }));

This is based on a JS playwright test script which does the following:

await Promise.all([
            this.page.click(sel),
            this.page.waitForNavigation({ waitUntil: "domcontentloaded" }),
        ]);

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions