This thread is trying to answer question "Is it possible to run a test in normal mode instead of incognito mode due to third-party libraries used by the framework?"
Related Ask AI answer for "How do I run tests in headed mode or UI Mode using Playwright?".
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.
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 firstname.lastname@example.org.