Skip to content
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

Feature Request - do not group grouped together by method (Playwright engine) #3453

Open
kevin-roe opened this issue Jan 16, 2025 · 0 comments

Comments

@kevin-roe
Copy link

When we run playwright tests, there are usually several page.locator().click() calls, several page.waitForURL() calls, etc. However, When the tests are finished running and i go to view the errors, I see something like this:

Errors
page.waitForURL: Timeout 30000ms exceeded. 100
locator.click: Timeout 30000ms exceeded. 200

etc...

Here's the problem - it doesn't tell me which waitForURL failed, or which click failed. That's vital information when load testing a workflow - I need to know which step in the test failed.

To solve this problem, I did two things -

  1. I initially gave each call a different timeout so I knew which method failed (30_001, 30_002, etc). This gave me:
Errors
page.waitForURL: Timeout 30001ms exceeded. 40
page.waitForURL: Timeout 30002ms exceeded. 60
locator.click: Timeout 30001ms exceeded. 120
locator.click: Timeout 30002ms exceeded. 80
  1. I then caught the exception and modified the stack trace with the line that failed. So now I get something like this:
Errors
page.waitForURL: Timeout 30000ms exceeded. [11] 40
page.waitForURL: Timeout 30000ms exceeded. [18] 60
locator.click: Timeout 30000ms exceeded. [22] 120
locator.click: Timeout 30000ms exceeded. [33] 80

But these are really clunky workarounds. It would be great if there was a way to track which lines in the playwright script failed and not just which methods threw failures.

Version info:

2.0.22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant