Skip to content

Instantly share code, notes, and snippets.

View MarcusFelling's full-sized avatar

Marcus Felling MarcusFelling

View GitHub Profile
// Throw Error: Path is not available when connecting remotely. Use saveAs() to save a local copy.
import { test, expect } from '@playwright/test';
import fs from 'fs';
test('download result', async ({ page }) => {
await page.goto('https://demo.playwright.dev/svgomg');
await page.locator('.menu-item >> text=Demo').click();
const downloadButton = page.locator('a[title=Download]');
await expect(downloadButton).toHaveAttribute('href', /blob/);
const [download] = await Promise.all([
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';
import { AzureReporterOptions } from '@alex_neo/playwright-azure-reporter/dist/playwright-azure-reporter';
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './tests',
/* Maximum time one test can run for. */