mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: specify the context id when adding bindings (#10366)
This commit is contained in:
@@ -803,6 +803,12 @@
|
||||
"parameters": ["webDriverBiDi"],
|
||||
"expectations": ["FAIL"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[queryhandler.spec] Query handler tests P selectors should work for ARIA selectors in multiple isolated worlds",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["webDriverBiDi"],
|
||||
"expectations": ["FAIL"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[queryhandler.spec] Query handler tests P selectors should work with :hover",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
@@ -2429,6 +2435,12 @@
|
||||
"parameters": ["cdp", "firefox"],
|
||||
"expectations": ["FAIL"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[queryhandler.spec] Query handler tests P selectors should work for ARIA selectors in multiple isolated worlds",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["cdp", "firefox"],
|
||||
"expectations": ["FAIL"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[requestinterception-experimental.spec] request interception \"after each\" hook in \"request interception\"",
|
||||
"platforms": ["win32"],
|
||||
|
||||
@@ -446,6 +446,26 @@ describe('Query handler tests', function () {
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should work for ARIA selectors in multiple isolated worlds', async () => {
|
||||
const {page} = getTestState();
|
||||
let element = await page.waitForSelector('::-p-aria(world)');
|
||||
assert(element, 'Could not find element');
|
||||
expect(
|
||||
await element.evaluate(element => {
|
||||
return element.id === 'b';
|
||||
})
|
||||
).toBeTruthy();
|
||||
// $ would add ARIA query handler to the main world.
|
||||
await element.$('::-p-aria(world)');
|
||||
element = await page.waitForSelector('::-p-aria(world)');
|
||||
assert(element, 'Could not find element');
|
||||
expect(
|
||||
await element.evaluate(element => {
|
||||
return element.id === 'b';
|
||||
})
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should work ARIA selectors with role', async () => {
|
||||
const {page} = getTestState();
|
||||
const element = await page.$('::-p-aria(world[role="button"])');
|
||||
|
||||
Reference in New Issue
Block a user