> OctoPerf load testing - Playwright node project import documentation page. How to import a Playwright .spec files and package.json in OctoPerf?

Source: https://api.octoperf.com/doc/design/create-virtual-user/import-playwright-node-project/

# Playwright import

![Playwright logo](https://api.octoperf.com/doc/design/create-virtual-user/img/playwright/playwright.png)

[Playwright](https://playwright.dev) is an automation framework created by Microsoft. It allows testers to write automated tests using a single API that works across multiple browsers, including Chrome, Firefox, and Microsoft Edge.

!!! note
    Using real browsers generally makes the Virtual Users creation process faster since no correlations will be required. But on the other hand real browsers cannot generate the same amount of Virtual Users per load generator. That's why we limit Playwright users to 5 Virtual users per load generator compared to 1000 for JMeter Virtual Users.

## Prerequisites

Before you import a Playwright Virtual user inside OctoPerf, it is recommended to use a local installation of Playwright to capture a user journey.

The [official playwright installation guide](https://playwright.dev/docs/intro) explains all there is to know in order to get started. Simply make sure to have [Node.js](https://nodejs.org/) installed in order to follow their instructions.

!!! info
    For a step by step guide on how to install and configure playwright follow our [introduction blog post here](https://blog.octoperf.com/getting-started-with-playwright-a-comprehensive-guide/#prerequisites).

## Recording with Playwright

Once Playwright is installed on your computer, you can use the build-in recorder to create your first script. We are going to record on our [public demo application](https://petstore.octoperf.com):

```bash
npx playwright codegen petstore.octoperf.com
```

After a few seconds a new window opens where we can navigate inside the Petstore:

![Record](https://api.octoperf.com/doc/design/create-virtual-user/img/playwright/record.png)

And at the same time, the corresponding playwright script is generated:

![codegen](https://api.octoperf.com/doc/design/create-virtual-user/img/playwright/codegen.png)

This **.ts** script is what you can upload in OctoPerf next.

!!! info
    For a step by step guide on how to record with playwright follow our [recording guide here](https://blog.octoperf.com/playwright-test-generator/#recording-a-script-with-playwright-codegen).

## Import your recording

Select the **.ts** script file you want to upload:

![import](https://api.octoperf.com/doc/design/create-virtual-user/img/playwright/import.png)

You can also add a custom Package.json file, otherwise the default one will be used.

!!! note
    If you do not provide any file, we will create a new Playwright script using a template testing our [demo application](https://petstore.octoperf.com).
