-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]WebKit test failed with page.waitForNavigation() method #4964
Comments
Can you provide some more code so that we can reproduce this behavior? Also, can you verify that your page actually logs out in webkit? Try running with |
Here you can find the full code and removed sensitive details: describe(`(${browserName}): Login to Dashboard`, () => {
it("Login should be successfull", async () => {
await page.goto("https://dashboard-**.com/");
await page.click(
"(//input[normalize-space(@placeholder)='[email protected]' and normalize-space(@type)='text' and normalize-space(@name)='username'])[2]"
);
await page.fill(
"(//input[normalize-space(@placeholder)='[email protected]' and normalize-space(@type)='text' and normalize-space(@name)='username'])[2]",
"<username>"
);
await page.click(
"(//input[normalize-space(@placeholder)='Password' and normalize-space(@type)='password' and normalize-space(@name)='password'])[2]"
);
await page.fill(
"(//input[normalize-space(@placeholder)='Password' and normalize-space(@type)='password' and normalize-space(@name)='password'])[2]",
"<password>"
);
await Promise.all([
**page.waitForNavigation(/*{ url: '<home_page_url>' }*/),**
page.click(
"(//input[normalize-space(@aria-label)='submit' and normalize-space(@type)='Submit' and normalize-space(@name)='signInSubmitButton'])[2]"
),
]);
await page.click("text=/.*<username>.*/");
// Click text="Log out"
await Promise.all([
// **page.waitForNavigation(/*{ url: '<url>' }*/),**
page.click('text="Log out"'),
]);
});
}); There are two waitForNavigation methods. Enable either one cause to fail the test case. For your question, it won't execute the next command after "waitForNavigation" method. In the above code, it won't log in to the home page. |
Could you confirm that when you run it with |
We need more info to act on this, please feel free to open a new issue with more details! |
Context:
Code Snippet
Describe the bug
Running tests with multiple browser and found out Webkit tests failed with "page.waitForNavigation()" method. Once debugging saw that waitForNavigation method cause to run few loops in emitHook method in "async_hooks.js". Once removed waitForNavigation method, test working fine.
This only fails with WebKit browser. Chrome and firefox working fine.
Suspect issue having reference to : puppeteer/puppeteer#5422
The text was updated successfully, but these errors were encountered: