-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
playwright-xpath/tests/spec.ts
Line 24 in 01695c3
| // TODO: xpath 3 tests |
import { selectors } from 'playwright'
test.beforeAll(async () => {
await selectors.register('xpath3', selectorEngine)
})
test('any node', async ({ page }) => {
await page.setContent('<div>asdf</div>')
await page.waitForSelector('xpath3=//*')
})
test('node type', async ({ page }) => {
await page.setContent('<div><span>asdf</span></div>')
await page.waitForSelector('xpath3=//span')
})
test('xpath 2 function', async ({ page }) => {
await page.setContent('<div><button>Click me</button></div>')
await page.click("xpath3=//button[starts-with(., 'Click')]")
})
// TODO: xpath 3 tests