← Back to Discord Forum

Test not run in incognito mode

jan.ostgrenposted in #help-playwright
Open in Discord

I have test which not run in incognito mode. Is it possible to run a test in normal mode. I have heard that it is not supported due to 3-party libs used by the framework.

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?"

0 replies


Running Tests in Normal Mode with 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.

Headed Mode

To run tests in headed mode, use the --headed flag with the npx playwright test command:

npx playwright test --headed

UI Mode

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 HTML or JSON:

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.

Browser Support

Playwright supports multiple browsers such as Chromium (default), Firefox, and WebKit. You can configure which browsers your tests should run on in the playwright.config.js file.

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.

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

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 luc@ray.run.