Debugging of Playwright Tests:
During development of Test cases or fixing Test cases, we need to Debug Test case to understand where Test case is failing
Let us understand different ways:
1. CMD
2. VS Code Extension
1. CMD: In CMD there are 2 options: --ui and --debug
1.1 npx playwright test --ui : This will show execution flow and traces during execution as well as before and after execution
1.2 npx playwright test --debug: This will pause the execution and we can proceed step by step to next step
2. VS Code Extension:
Using VS Code Extension, we can simply right click test or file or suite and can run test cases in debug mode.
I personally feel VS Code Extension is more useful option for debugging.
Regards
PrinceAutomationDestination
Download
0 formats
No download links available.
How to Debug Playwright Tests | CMD & VS Code | Trace viewer | NatokHD