Lesson 1: Introduction to Playwright

Welcome to Playwright

Playwright is a framework for Web-Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

Key Features

  • • Cross-browser: Support for all modern engines.
  • • Auto-wait: Playwright waits for elements to be actionable.
  • • Assertion library: Native expect() with web-first matchers.
  • Your First Test

    javascript

    const { test, expect } = require('@playwright/test');

    test('basic test', async ({ page }) => {

    await page.goto('https://www.careerraah.com');

    const title = page.locator('.navbar-brand');

    await expect(title).toHaveText('CareerRaah');

    });

      CareerRaah - AI Learning Platform for Professionals