• ✅ A code editor (VS Code recommended)
  • ✅ Language runtime for the tab you choose below
Note on browsers Playwright ships its own bundled, tested browser binaries (Chromium, Firefox, WebKit) and installs them for you in every language — you don't need Chrome or Firefox pre-installed.

Installation

Needs Node.js 18+ (includes npm).
  1. Install Node.js

    Go to nodejs.org and download the Node.js 24 (LTS) Windows installer — it's the version highlighted by default on the download page.

    node --version
  2. Install an IDE — VS Code

    Download from code.visualstudio.com and run the installer. Then install the official Playwright Test for VSCode extension from the Extensions panel — it lets you run and debug tests right from the editor.

  3. Scaffold a Playwright project

    mkdir playwright-practice
    cd playwright-practice
    npm init playwright@latest

    When prompted "TypeScript or JavaScript?", choose TypeScript. This also downloads the Chromium/Firefox/WebKit browser binaries automatically — no separate driver to install.

  4. Verify with a basic test

    Replace tests/example.spec.ts with:

    import { test, expect } from '@playwright/test';
    
    test('loads example.com', async ({ page }) => {
      await page.goto('https://example.com');
      await expect(page).toHaveTitle(/Example/);
    });

    Run it from the terminal, or click "Run Test" in VS Code if you installed the extension:

    npx playwright test --headed

    A browser window should open, load example.com, and the terminal should report the test passed.

  1. Install Node.js

    Using Homebrew (or download the Node.js 24 (LTS) installer from nodejs.org instead):

    brew install node@24
    node --version
  2. Install an IDE — VS Code

    Download from code.visualstudio.com and install it. Then install the official Playwright Test for VSCode extension from the Extensions panel — it lets you run and debug tests right from the editor.

  3. Scaffold a Playwright project

    mkdir playwright-practice
    cd playwright-practice
    npm init playwright@latest

    When prompted "TypeScript or JavaScript?", choose TypeScript. This also downloads the Chromium/Firefox/WebKit browser binaries automatically — no separate driver to install.

  4. Verify with a basic test

    Replace tests/example.spec.ts with:

    import { test, expect } from '@playwright/test';
    
    test('loads example.com', async ({ page }) => {
      await page.goto('https://example.com');
      await expect(page).toHaveTitle(/Example/);
    });

    Run it from the terminal, or click "Run Test" in VS Code if you installed the extension:

    npx playwright test --headed

    A browser window should open, load example.com, and the terminal should report the test passed.

Needs Node.js 18+ (includes npm).
  1. Install Node.js

    Go to nodejs.org and download the Node.js 24 (LTS) Windows installer — it's the version highlighted by default on the download page.

    node --version
  2. Install an IDE — VS Code

    Download from code.visualstudio.com and run the installer. Then install the official Playwright Test for VSCode extension from the Extensions panel — it lets you run and debug tests right from the editor.

  3. Scaffold a Playwright project

    mkdir playwright-practice
    cd playwright-practice
    npm init playwright@latest

    When prompted "TypeScript or JavaScript?", choose JavaScript. This also downloads the Chromium/Firefox/WebKit browser binaries automatically — no separate driver to install.

  4. Verify with a basic test

    Replace tests/example.spec.js with:

    const { test, expect } = require('@playwright/test');
    
    test('loads example.com', async ({ page }) => {
      await page.goto('https://example.com');
      await expect(page).toHaveTitle(/Example/);
    });

    Run it from the terminal, or click "Run Test" in VS Code if you installed the extension:

    npx playwright test --headed

    A browser window should open, load example.com, and the terminal should report the test passed.

  1. Install Node.js

    Using Homebrew (or download the Node.js 24 (LTS) installer from nodejs.org instead):

    brew install node@24
    node --version
  2. Install an IDE — VS Code

    Download from code.visualstudio.com and install it. Then install the official Playwright Test for VSCode extension from the Extensions panel — it lets you run and debug tests right from the editor.

  3. Scaffold a Playwright project

    mkdir playwright-practice
    cd playwright-practice
    npm init playwright@latest

    When prompted "TypeScript or JavaScript?", choose JavaScript. This also downloads the Chromium/Firefox/WebKit browser binaries automatically — no separate driver to install.

  4. Verify with a basic test

    Replace tests/example.spec.js with:

    const { test, expect } = require('@playwright/test');
    
    test('loads example.com', async ({ page }) => {
      await page.goto('https://example.com');
      await expect(page).toHaveTitle(/Example/);
    });

    Run it from the terminal, or click "Run Test" in VS Code if you installed the extension:

    npx playwright test --headed

    A browser window should open, load example.com, and the terminal should report the test passed.

Needs Python 3.9+ and pip.
  1. Install Python

    Go to python.org/downloads and download the latest Python 3 Windows installer. Run it, and check "Add python.exe to PATH" on the first screen.

    python --version
  2. Install an IDE — PyCharm or VS Code

    Either works fine for the rest of this guide. Pick one:

    PyCharm: download the free Community edition from jetbrains.com/pycharm/download.

    VS Code: download from code.visualstudio.com, then install the Python extension.

  3. Create a project and install Playwright

    mkdir playwright-practice
    cd playwright-practice
    python -m venv venv
    venv\Scripts\activate
    pip install pytest-playwright
    playwright install

    playwright install downloads the Chromium/Firefox/WebKit browser binaries — no separate driver to manage.

  4. Verify with a basic test

    Save as test_example.py:

    from playwright.sync_api import Page, expect
    
    def test_loads_example(page: Page):
        page.goto("https://example.com")
        expect(page).to_have_title("Example Domain")
    pytest test_example.py --headed

    A browser window should open, load example.com, and pytest should report 1 passed.

  1. Install Python

    Using Homebrew (or download the macOS installer from python.org/downloads instead):

    brew install python
    python3 --version
  2. Install an IDE — PyCharm or VS Code

    Either works fine for the rest of this guide. Pick one:

    PyCharm: download the free Community edition from jetbrains.com/pycharm/download (pick the Apple Silicon build if you're on an M-series Mac).

    VS Code: download from code.visualstudio.com, then install the Python extension.

  3. Create a project and install Playwright

    mkdir playwright-practice
    cd playwright-practice
    python3 -m venv venv
    source venv/bin/activate
    pip install pytest-playwright
    playwright install

    playwright install downloads the Chromium/Firefox/WebKit browser binaries — no separate driver to manage.

  4. Verify with a basic test

    Save as test_example.py:

    from playwright.sync_api import Page, expect
    
    def test_loads_example(page: Page):
        page.goto("https://example.com")
        expect(page).to_have_title("Example Domain")
    pytest test_example.py --headed

    A browser window should open, load example.com, and pytest should report 1 passed.

Needs JDK 17+ and Maven.
  1. Install the JDK

    Go to oracle.com/java/technologies/downloads and download the JDK 17 or higher (LTS) — Windows x64 Installer (the .msi). Run it.

    java -version
  2. Install an IDE — Eclipse or IntelliJ

    Either works fine for the rest of this guide. Pick one:

    Eclipse: download the installer from eclipse.org/downloads and choose "Eclipse IDE for Enterprise Java and Web Developers".

    IntelliJ IDEA: download the free Community edition from jetbrains.com/idea/download.

  3. Install Maven

    Download from maven.apache.org, unzip it, and add its bin folder to PATH in system environment variables.

    mvn -version
  4. Create a project and add Playwright

    In your IDE: File → New → Project → Maven, or from a terminal:

    mvn archetype:generate -DgroupId=com.practice -DartifactId=playwright-practice -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
    cd playwright-practice

    Add to pom.xml inside <dependencies>:

    <dependency>
      <groupId>com.microsoft.playwright</groupId>
      <artifactId>playwright</artifactId>
      <version>1.46.0</version>
    </dependency>
  5. Install the browser binaries

    Unlike Selenium, there's no ChromeDriver to manage — Playwright downloads its own tested Chromium/Firefox/WebKit builds:

    mvn compile
    mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"
  6. Verify with a basic test

    Open the project in your IDE and replace App.java with:

    import com.microsoft.playwright.*;
    
    public class App {
      public static void main(String[] args) {
        try (Playwright playwright = Playwright.create()) {
          Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setHeadless(false));
          Page page = browser.newPage();
          page.navigate("https://example.com");
          System.out.println(page.title());
          browser.close();
        }
      }
    }

    Run it from your IDE (right-click the file → Run), or from a terminal:

    mvn compile exec:java -Dexec.mainClass="com.practice.App"

    A browser window should open, load example.com, and the title should print to the console.

  1. Install the JDK

    Go to oracle.com/java/technologies/downloads and download the JDK 17 (LTS) macOS Installer — pick ARM64 for Apple Silicon or x64 for Intel. Run the .dmg, then confirm:

    java -version

    Prefer Homebrew? brew install openjdk@17 works too.

  2. Install an IDE — Eclipse or IntelliJ

    Either works fine for the rest of this guide. Pick one:

    Eclipse: download the installer (.dmg) from eclipse.org/downloads and choose "Eclipse IDE for Enterprise Java and Web Developers".

    IntelliJ IDEA: download the free Community edition from jetbrains.com/idea/download (pick the Apple Silicon build if you're on an M-series Mac).

  3. Install Maven

    brew install maven
    mvn -version
  4. Create a project and add Playwright

    In your IDE: File → New → Project → Maven, or from a terminal:

    mvn archetype:generate -DgroupId=com.practice -DartifactId=playwright-practice -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
    cd playwright-practice

    Add to pom.xml inside <dependencies>:

    <dependency>
      <groupId>com.microsoft.playwright</groupId>
      <artifactId>playwright</artifactId>
      <version>1.46.0</version>
    </dependency>
  5. Install the browser binaries

    Unlike Selenium, there's no ChromeDriver to manage — Playwright downloads its own tested Chromium/Firefox/WebKit builds:

    mvn compile
    mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"
  6. Verify with a basic test

    Open the project in your IDE and replace App.java with:

    import com.microsoft.playwright.*;
    
    public class App {
      public static void main(String[] args) {
        try (Playwright playwright = Playwright.create()) {
          Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setHeadless(false));
          Page page = browser.newPage();
          page.navigate("https://example.com");
          System.out.println(page.title());
          browser.close();
        }
      }
    }

    Run it from your IDE (right-click the file → Run), or from a terminal:

    mvn compile exec:java -Dexec.mainClass="com.practice.App"

    A browser window should open, load example.com, and the title should print to the console.

Needs .NET SDK 6+.
  1. Install the .NET SDK

    Go to dotnet.microsoft.com/download and download the latest .NET SDK Windows installer. Run it.

    dotnet --version
  2. Install an IDE — Visual Studio or VS Code

    Either works fine for the rest of this guide. Pick one:

    Visual Studio: download the free Community edition from visualstudio.microsoft.com/downloads and select the ".NET desktop development" workload during install.

    VS Code: download from code.visualstudio.com, then install the C# Dev Kit extension.

  3. Create a project and add Playwright

    dotnet new nunit -n PlaywrightPractice
    cd PlaywrightPractice
    dotnet add package Microsoft.Playwright.NUnit
    dotnet build
  4. Install the browser binaries

    Unlike Selenium, there's no ChromeDriver to manage — Playwright generates a PowerShell helper script during build that downloads its own browsers:

    pwsh bin/Debug/net8.0/playwright.ps1 install
  5. Verify with a basic test

    Replace the generated test file with:

    using Microsoft.Playwright.NUnit;
    
    [TestFixture]
    public class ExampleTest : PageTest
    {
        [Test]
        public async Task LoadsExample()
        {
            await Page.GotoAsync("https://example.com");
            await Expect(Page).ToHaveTitleAsync("Example Domain");
        }
    }

    Run it from your IDE, or from a terminal:

    dotnet test

    This runs headless by default — dotnet test should report the test passed in the terminal, that's a working setup.

  1. Install the .NET SDK

    Using Homebrew (or download the macOS installer from dotnet.microsoft.com/download instead):

    brew install --cask dotnet-sdk
    dotnet --version
  2. Install an IDE

    VS Code is the standard free choice on Mac (Visual Studio for Mac was discontinued). Download from code.visualstudio.com and install the C# Dev Kit extension.

    Prefer a full IDE? JetBrains Rider (paid, free trial) from jetbrains.com/rider/download also works well.

  3. Create a project and add Playwright

    dotnet new nunit -n PlaywrightPractice
    cd PlaywrightPractice
    dotnet add package Microsoft.Playwright.NUnit
    dotnet build
  4. Install the browser binaries

    Unlike Selenium, there's no ChromeDriver to manage — Playwright generates a shell helper script during build that downloads its own browsers:

    pwsh bin/Debug/net8.0/playwright.sh install

    No pwsh? Install PowerShell first: brew install --cask powershell

  5. Verify with a basic test

    Replace the generated test file with:

    using Microsoft.Playwright.NUnit;
    
    [TestFixture]
    public class ExampleTest : PageTest
    {
        [Test]
        public async Task LoadsExample()
        {
            await Page.GotoAsync("https://example.com");
            await Expect(Page).ToHaveTitleAsync("Example Domain");
        }
    }

    Run it from your IDE, or from a terminal:

    dotnet test

    This runs headless by default — dotnet test should report the test passed in the terminal, that's a working setup.

Next Head to Basic Elements and start practicing — point page.goto() at any page, toggle Help (top right) to reveal each element's locator icon, and copy the code straight into your test.