![Playwright Test Runner avatar](https://images.apifyusercontent.com/FSrEbmbnzoPbGAiZ8Hlb-jXaQl4FS4VjFBr7J8sV1jU/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9FUnRybjRsYXRlMU42YVNpTi9CdGJzWVI3RlpXQ0Nka3A3RS1iaXRtYXAucG5n.webp)
Playwright Test Runner
Try for free
No credit card required
View all Actors![Playwright Test Runner](https://images.apifyusercontent.com/FSrEbmbnzoPbGAiZ8Hlb-jXaQl4FS4VjFBr7J8sV1jU/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9FUnRybjRsYXRlMU42YVNpTi9CdGJzWVI3RlpXQ0Nka3A3RS1iaXRtYXAucG5n.webp)
![Playwright Test Runner](https://images.apifyusercontent.com/FSrEbmbnzoPbGAiZ8Hlb-jXaQl4FS4VjFBr7J8sV1jU/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9FUnRybjRsYXRlMU42YVNpTi9CdGJzWVI3RlpXQ0Nka3A3RS1iaXRtYXAucG5n.webp)
Playwright Test Runner
jindrich.bar/playwright-test
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
2API_TOKEN=<YOUR_API_TOKEN>
3
4# Prepare Actor input
5cat > input.json <<'EOF'
6{
7 "testCode": "import { test, expect } from '@playwright/test'; \n test('has title', async ({ page }) => { \n await page.goto('https://playwright.dev/');\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('https://playwright.dev/');\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 });"
8}
9EOF
10
11# Run the Actor using an HTTP API
12# See the full API reference at https://docs.apify.com/api/v2
13curl "https://api.apify.com/v2/acts/jindrich.bar~playwright-test/runs?token=$API_TOKEN" \
14 -X POST \
15 -d @input.json \
16 -H 'Content-Type: application/json'
Developer
Maintained by Community
Actor metrics
- 1 monthly user
- 5 stars
- 100.0% runs succeeded
- Created in Feb 2023
- Modified over 1 year ago