mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: fix the first test example
This commit is contained in:
parent
2aff06ec73
commit
3f4a791cb7
@ -41,7 +41,7 @@ const { test, expect } = require('@playwright/test');
|
|||||||
|
|
||||||
test('basic test', async ({ page }) => {
|
test('basic test', async ({ page }) => {
|
||||||
await page.goto('https://playwright.dev/');
|
await page.goto('https://playwright.dev/');
|
||||||
const title = page.locator('.navbar__title');
|
const title = page.locator('.navbar__inner .navbar__title');
|
||||||
await expect(title).toHaveText('Playwright');
|
await expect(title).toHaveText('Playwright');
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -51,7 +51,7 @@ import { test, expect } from '@playwright/test';
|
|||||||
|
|
||||||
test('basic test', async ({ page }) => {
|
test('basic test', async ({ page }) => {
|
||||||
await page.goto('https://playwright.dev/');
|
await page.goto('https://playwright.dev/');
|
||||||
const title = page.locator('.navbar__title');
|
const title = page.locator('.navbar__inner .navbar__title');
|
||||||
await expect(title).toHaveText('Playwright');
|
await expect(title).toHaveText('Playwright');
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user