Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A browser in Playwright is a running instance of a web browser, such as Chromium, Firefox, or WebKit. It provides an environment for interacting with web pages, including creating pages, navigating to URLs, interacting with page elements, and executing JavaScript code.

A context in Playwright is a single browsing session within a browser. Each context has its own set of cookies, cache, and storage, and can navigate independently of other contexts within the same browser instance. Contexts are useful for testing scenarios where users log in and out of a web application or for isolating test cases in parallel testing.