How to Run Playwright Tests Sequentially in Same Browser Context

The Playwright is a new automation framework by Microsoft. The Playwright framework is distributed under MIT Open Source License. Playwright supports various programming languages such as Java, JavaScript, TypeScript, .Net, etc. 

Playwright Executes Each Scenario in Its Own New Browser Context

If you have worked with the Playwright framework you might have observed that if you write multiple tests inside the describe function, it gets executed one after another but each test runs in a separate browser context. That means that if you have performed a login in test1() it doesn't preserve those in test2(). The reason is that each time playwright executes the test, it creates a new context and executes the test. This feature also allows you to write independent tests and you can execute them parallelly with less execution time.

How to Make Simple End-To-End Tests With JavaTea

Although automated testing is an effective way to validate web applications, creating automated tests is time-consuming and maintaining the tests is painful. End-to-end testing is especially complex and taking time to execute.

To make it easier, this article proposes to use JavaTea, which is an end-to-end functional automation framework. It is built on Selenium WebDriver but it allows you to describe tests with less code compared to Selenium. The following three topics are focused in this article: