> For the complete documentation index, see [llms.txt](https://docs.walnutai.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.walnutai.ai/core-features/intelligence-hub/generate-test-cases/playwright-scripts.md).

# Playwright Scripts

Import your existing Playwright automation framework into WalnutAI and automatically convert your scripts into structured, execution-ready test cases.

**1. Git Repository**

* Connect any Git repository that contains Playwright automation scripts. WalnutAI analyzes the complete framework, including the existing **Page Object Model, tests, fixtures, and helpers**, and uses the framework context to generate automated test cases within WalnutAI.
* **When to Use:** Use this option when your Playwright project is maintained in a Git repository and you want to import the complete framework.
* **Result:** The framework is analyzed, and automated test cases are generated in WalnutAI while preserving the existing framework context.

<figure><img src="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FeLYs771u5OpZdtQ60kyo%2FScreenshot%202026-08-17%20at%2012.42.23%E2%80%AFPM.png?alt=media&amp;token=65fe62df-183c-404c-acf7-2de8213ad910" alt=""><figcaption></figcaption></figure>

**2. ZIP Archive**

* Upload a Playwright project as a ZIP file directly from your local device. WalnutAI analyzes the project files and converts the existing automation scripts into automated test cases.
* **When to Use:** Use this option when your Playwright project is available locally as a ZIP archive.
* **Result:** The uploaded project is analyzed and converted into automated test cases that can be reviewed and saved in WalnutAI.

<figure><img src="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FTz5mL8K2TZtNwDhFcUqv%2FScreenshot%202026-08-17%20at%201.11.44%E2%80%AFPM.png?alt=media&amp;token=b4c9dc91-c528-43da-9675-64ef286310da" alt=""><figcaption></figcaption></figure>

**3. Script Files**

* Upload individual Playwright test scripts to convert existing automation scripts into structured test cases within WalnutAI.
* **Supported Scripts:** Playwright (`.ts`, `.js`, `.spec.ts`, `.spec.js`)
* **When to Use:** Use this option when you have specific Playwright test scripts that you want to convert without importing the complete framework.

<figure><img src="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FstSmnXEeaYVxMBKy0A9P%2FScreenshot%202026-08-17%20at%2012.40.19%E2%80%AFPM.png?alt=media&amp;token=c65ab242-abac-48d7-ba8f-c49004527376" alt=""><figcaption></figcaption></figure>

**Steps to Generate Test Cases:**

* From Intelligence Hub, select the **Playwright Framework.**
* Upload the supported Playwright script files.
* Review the generated test cases.
* Click Save to store the test cases in WalnutAI.

<figure><img src="https://295337183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9aroNmDWVJAmMjkdy0hx%2Fuploads%2FLhPZO80C5tcTNnndJt8h%2FScreenshot%202026-08-17%20at%2012.44.48%E2%80%AFPM.png?alt=media&amp;token=17bb89ba-082e-4b1d-b39a-97d64bc5fd26" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Result:** The saved test cases are available in the **Test Case** module as automated test cases.
{% endhint %}
