Skip to content

Commit

Permalink
drive-by: better record-video test which doesn't get blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Oct 18, 2024
1 parent 2de0973 commit cef79a6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions frontend/src/examples/javascript/record-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ const { chromium } = require('playwright');
});
const page = await context.newPage();

await page.goto('https://github.com');
await page.locator('button').filter({ hasText: 'Search or jump to...' }).click();
await page.getByRole('combobox', { name: 'Search' }).fill('Playwright');
await page.getByRole('combobox', { name: 'Search' }).press('Enter');
await page.getByRole('link', { name: 'microsoft/playwright', exact: true }).click();
await page.waitForLoadState('networkidle');
for (let i = 0; i < 3; i++) {
await page.goto('https://news.ycombinator.com/');
await page.getByRole('link', { name: 'new', exact: true }).click();
await page.locator('.pagetop > a').first().click();
await page.getByRole('link', { name: 'comments', exact: true }).click();
await page.getByRole('link', { name: 'ask' }).click();
await page.getByRole('link', { name: 'show' }).click();
await page.getByRole('link', { name: 'jobs' }).click();
await page.getByRole('link', { name: 'login' }).click();
}

await browser.close();
})();

0 comments on commit cef79a6

Please sign in to comment.