mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: text selector with double quotes (#16865)
This commit is contained in:
parent
849da28dc4
commit
67d5c13d65
@ -439,3 +439,15 @@ it('should work with unpaired quotes when not at the start', async ({ page }) =>
|
||||
expect(await page.$(`text=" >> span`)).toBe(null);
|
||||
expect(await page.$(`text=\` >> span`)).toBe(null);
|
||||
});
|
||||
|
||||
it('should work with paired quotes in the middle of selector', async ({ page }) => {
|
||||
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/16858' });
|
||||
it.fail();
|
||||
await page.setContent(`<div>pattern "^-?\\d+$"</div>`);
|
||||
expect(await page.locator(`div >> text=pattern "^-?\\d+$`).isVisible());
|
||||
expect(await page.locator(`div >> text=pattern "^-?\\d+$"`).isVisible());
|
||||
expect(await page.locator(`div >> text='pattern "^-?\\d+$"'`).isVisible());
|
||||
await expect(page.locator(`div >> text=pattern "^-?\\d+$`)).toBeVisible();
|
||||
await expect(page.locator(`div >> text=pattern "^-?\\d+$"`)).toBeVisible();
|
||||
await expect(page.locator(`div >> text='pattern "^-?\\d+$"'`)).toBeVisible();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user