Playwright Test Runner avatar
Playwright Test Runner
Try for free

No credit card required

View all Actors
Playwright Test Runner

Playwright Test Runner
Try for free

No credit card required

Run Playwright tests across numerous browser configurations with Apify. Create your tests in seconds and get comprehensive test reports faster than ever.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more

1# Set API token
4# Prepare Actor input
5cat > input.json <<'EOF'
7  "testCode": "import { test, expect } from '@playwright/test';    \n    test('has title', async ({ page }) => {      \n      await page.goto('');\n      // Expect a title \"to contain\" a substring.\n      await expect(page).toHaveTitle(/Playwright/);    \n    });\n    test('get started link', async ({ page }) => {\n        await page.goto('');\n        // Click the get started link.\n        await page.getByRole('link', { name: 'Get started' }).click();\n        // Expects the URL to contain intro. \n        await expect(page).toHaveURL(/.*intro/);    \n    });"
11# Run the Actor using an HTTP API
12# See the full API reference at
13curl "$API_TOKEN" \
14  -X POST \
15  -d @input.json \
16  -H 'Content-Type: application/json'
Maintained by Community
Actor metrics
  • 2 monthly users
  • 5 stars
  • 100.0% runs succeeded
  • Created in Feb 2023
  • Modified over 1 year ago