Cross-Browser Testing

Cross-browser testing compares and analyzes the website’s behavior across different browsers like Chrome, Firefox, Safari, etc. It ensures that the website gives the same optimal performance regardless of the browser used to access it.

Cross-Browser Automation Testing

It is the practice of ensuring that websites behave likewise across different browsers by using different libraries/frameworks. These libraries or frameworks are integrated into code that tests the behavior of websites automatically. Hence, it saves the effort of testing web applications manually.

Playwright Introduction

Playwright is a Node.js cross-browser automation testing library to automate tests on different browser engines like Chromium, Webkit, and Mozilla with a single API.

It is an open-source browser automation framework, created by Microsoft for Javascript engineers to test their websites on Firefox, Chromium, and Webkit browsers.

Playwright on Educative

This guide will help you to set up a working environment for Playwright on Educative. Let’s start.

You might already have the idea that Docker is used to provide the environment required by any application on Educative.

Before diving into Docker, it would be a good idea to revise your docker concepts.

If you are a beginner, setting up your environment locally before moving to the Educative might be a useful practice.

Custom Environment Setup

A custom environment can be set up on Educative using Docker. It involves the following steps:

  1. Create a Dockerfile.
  2. Make a tarball of the Dockerfile and project folder (if present).
  3. Build the Docker image on educative.
  4. Add the Docker job.
  5. Set up your widget.

Our Goal

This tutorial will teach you the complete process of setting up Playwright on the Educative platform

KeyPoint: We will be running Playwright in headless mode.

Playwright Boilerplate

We used Playwright boilerplate to demonstrate its working.

The application is present on https://github.com/e2e-boilerplate/playwright-typescript-ts-jest-jest-expect

In the next lesson, we will learn how to create a Docker file.