mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: update page object model example (#14917)
This commit is contained in:
parent
21c510ee0d
commit
db9ff4b7c9
@ -21,7 +21,7 @@ exports.PlaywrightDevPage = class PlaywrightDevPage {
|
|||||||
this.getStartedLink = page.locator('a', { hasText: 'Get started' });
|
this.getStartedLink = page.locator('a', { hasText: 'Get started' });
|
||||||
this.gettingStartedHeader = page.locator('h1', { hasText: 'Getting started' });
|
this.gettingStartedHeader = page.locator('h1', { hasText: 'Getting started' });
|
||||||
this.pomLink = page.locator('li', { hasText: 'Playwright Test' }).locator('a', { hasText: 'Page Object Model' });
|
this.pomLink = page.locator('li', { hasText: 'Playwright Test' }).locator('a', { hasText: 'Page Object Model' });
|
||||||
this.tocList = page.locator('article ul > li > a');
|
this.tocList = page.locator('article div.markdown ul > li > a');
|
||||||
}
|
}
|
||||||
|
|
||||||
async goto() {
|
async goto() {
|
||||||
@ -56,7 +56,7 @@ export class PlaywrightDevPage {
|
|||||||
this.getStartedLink = page.locator('a', { hasText: 'Get started' });
|
this.getStartedLink = page.locator('a', { hasText: 'Get started' });
|
||||||
this.gettingStartedHeader = page.locator('h1', { hasText: 'Getting started' });
|
this.gettingStartedHeader = page.locator('h1', { hasText: 'Getting started' });
|
||||||
this.pomLink = page.locator('li', { hasText: 'Playwright Test' }).locator('a', { hasText: 'Page Object Model' });
|
this.pomLink = page.locator('li', { hasText: 'Playwright Test' }).locator('a', { hasText: 'Page Object Model' });
|
||||||
this.tocList = page.locator('article ul > li > a');
|
this.tocList = page.locator('article div.markdown ul > li > a');
|
||||||
}
|
}
|
||||||
|
|
||||||
async goto() {
|
async goto() {
|
||||||
@ -93,6 +93,7 @@ test('getting started should contain table of contents', async ({ page }) => {
|
|||||||
'Writing assertions',
|
'Writing assertions',
|
||||||
'Using test fixtures',
|
'Using test fixtures',
|
||||||
'Using test hooks',
|
'Using test hooks',
|
||||||
|
'VS Code extension',
|
||||||
'Command line',
|
'Command line',
|
||||||
'Configure NPM scripts',
|
'Configure NPM scripts',
|
||||||
'Release notes'
|
'Release notes'
|
||||||
@ -123,6 +124,7 @@ test('getting started should contain table of contents', async ({ page }) => {
|
|||||||
'Writing assertions',
|
'Writing assertions',
|
||||||
'Using test fixtures',
|
'Using test fixtures',
|
||||||
'Using test hooks',
|
'Using test hooks',
|
||||||
|
'VS Code extension',
|
||||||
'Command line',
|
'Command line',
|
||||||
'Configure NPM scripts',
|
'Configure NPM scripts',
|
||||||
'Release notes'
|
'Release notes'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user