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
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 -
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
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
The text was updated successfully, but these errors were encountered:
When we run playwright tests, there are usually several
page.locator().click()
calls, severalpage.waitForURL()
calls, etc. However, When the tests are finished running and i go to view the errors, I see something like this: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 -
30_001
,30_002
, etc). This gave me: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:
The text was updated successfully, but these errors were encountered: