Absolutely, you can run tests in normal mode with Playwright. By default, tests run in headless mode, but you can switch to headed mode for a visual representation of the browser window. This is especially useful when working with third-party libraries that need a visible browser environment.
To run tests in headed mode, use the
--headed flag with the
npx playwright test command:
npx playwright test --headed
Playwright also offers a UI Mode for an enhanced developer experience. It includes features like time travel debugging and watch mode. You can inspect the DOM snapshot in its own window for better debugging capabilities.
To run tests in UI Mode, use the
--ui flag followed by either
npx playwright test --ui HTML
In UI Mode, you get a timeline view of each action of your test. You can hover over actions to see image snapshots and pick locators from DOM snapshots.
Playwright supports multiple browsers such as Chromium (default), Firefox, and WebKit. You can configure which browsers your tests should run on in the
In conclusion, Playwright provides options to run tests in headed mode and UI Mode, allowing you to have a visible browser environment and access additional debugging features.
If you still have questions, please ask a question and I will try to answer it.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email email@example.com.