Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed Jul 27, 2024
1 parent b7619ff commit 50d6954
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ test('Check home page', async ({ page }) => {

How to fix:

* Move `link` locator into the second step:
* Move `link` variable to the second step:
```ts
test('Check home page', async ({ page }) => {
// step: Open home page
Expand All @@ -197,14 +197,16 @@ How to fix:

* Close first step earlier:
```ts
// step: Open home page
await page.goto('https://playwright.dev');
// stepend
test('Check home page', async ({ page }) => {
// step: Open home page
await page.goto('https://playwright.dev');
// stepend

const link = page.getByRole('link', { name: 'Get started' });
const link = page.getByRole('link', { name: 'Get started' });

// step: Click link
await link.click();
// step: Click link
await link.click();
});
```

## License
Expand Down

0 comments on commit 50d6954

Please sign in to comment.