---
title: Playwright for Browser Rendering now available
description: Developers can now use the Playwright library for browser automation with Browser Rendering
image: https://edgetunnel-b2h.pages.dev/changelog-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://edgetunnel-b2h.pages.dev/changelog/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://edgetunnel-b2h.pages.dev/changelog/rss/index.xml) [ View RSS feeds ](https://edgetunnel-b2h.pages.dev/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://edgetunnel-b2h.pages.dev/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://edgetunnel-b2h.pages.dev/changelog/) 

## Playwright for Browser Rendering now available

Apr 04, 2025 

[ Browser Run ](https://edgetunnel-b2h.pages.dev/browser-run/) 

We're excited to share that you can now use Playwright's browser automation [capabilities ↗](https://playwright.dev/docs/api/class-playwright) from Cloudflare [Workers](https://edgetunnel-b2h.pages.dev/workers/).

[Playwright ↗](https://playwright.dev/) is an open-source package developed by Microsoft that can do browser automation tasks; it's commonly used to write software tests, debug applications, create screenshots, and crawl pages. Like [Puppeteer](https://edgetunnel-b2h.pages.dev/browser-run/puppeteer/), we [forked ↗](https://github.com/cloudflare/playwright) Playwright and modified it to be compatible with Cloudflare Workers and [Browser Rendering](https://edgetunnel-b2h.pages.dev/browser-run/).

Below is an example of how to use Playwright with Browser Rendering to test a TODO application using assertions:

**Assertion example**

```ts
import { launch, type BrowserWorker } from "@cloudflare/playwright";
import { expect } from "@cloudflare/playwright/test";


interface Env {
  MYBROWSER: BrowserWorker;
}


export default {
  async fetch(request: Request, env: Env) {
    const browser = await launch(env.MYBROWSER);
    const page = await browser.newPage();


    await page.goto("https://demo.playwright.dev/todomvc");


    const TODO_ITEMS = [
      "buy some cheese",
      "feed the cat",
      "book a doctors appointment",
    ];


    const newTodo = page.getByPlaceholder("What needs to be done?");
    for (const item of TODO_ITEMS) {
      await newTodo.fill(item);
      await newTodo.press("Enter");
    }


    await expect(page.getByTestId("todo-title")).toHaveCount(TODO_ITEMS.length);


    await Promise.all(
      TODO_ITEMS.map((value, index) =>
        expect(page.getByTestId("todo-title").nth(index)).toHaveText(value),
      ),
    );
  },
};
```

Playwright is available as an npm package at [@cloudflare/playwright ↗](https://www.npmjs.com/package/@cloudflare/playwright) and the code is at [GitHub ↗](https://github.com/cloudflare/playwright).

Learn more in our [documentation](https://edgetunnel-b2h.pages.dev/browser-run/playwright/).

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://edgetunnel-b2h.pages.dev/changelog/post/2025-04-04-playwright-beta/#page","headline":"Playwright for Browser Rendering now available · Changelog","description":"Developers can now use the Playwright library for browser automation with Browser Rendering","url":"https://edgetunnel-b2h.pages.dev/changelog/post/2025-04-04-playwright-beta/","inLanguage":"en","image":"https://edgetunnel-b2h.pages.dev/changelog-preview.png","dateModified":"2025-04-04","datePublished":"2025-04-04","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://edgetunnel-b2h.pages.dev/#website","name":"Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/"}}
```
