-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[browser mode] headless browser test fails where test with ui doesn't #7462
Comments
It could a same issue as #6485. You may try |
Hello @philSixZero. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with |
@hi-ogawa so your fix that you mention #6485 isn't in browser: {
viewport: { width: 1920, height: 1080 }, // here?
enabled: true,
screenshotFailures: true,
screenshotDirectory: './out/__screenshots__',
provider: 'playwright',
instances: [{ browser: 'chromium' }],
locators: {
testIdAttribute: 'id'
}
} |
I was suggesting to try the workaround mentioned by the issue author #6485 (comment) const resizeViewport: BrowserCommand<[number, number]> = async ({ page }, width, height) => {
await page.setViewportSize({ width, height });
}; |
My fault, I looked into it after writing the comment and saw that your PR is still in draft.
I will try that out! Using the built in command |
Great! The suggested workaround did it. I was confused about the screenshot that shows all the elements being in the viewport, so I didn't think the other issue would be related to that one here. Closing it, as it's a duplicate of #6485. |
Describe the bug
I have created multiple component tests with playwright & chromium using the UI. Running those tests in headless browser mode, at least 2 of the 18 test fail. Because the
locator.click()
call gets stuck and the test fails with a timeout error. I put a try-catch around the command execution to see why it fails, and the output is the following:After that the timeout error is thrown.
Two further observation:
Reproduction
I have to create a reproduction setup, since it occurred within the company's setup.
It's definitely a bug since headless behaves differently compared to ui mode, which shouldn't be the case, and maybe other stumbled upon this as well.
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: