mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
feat(webkit): implement ElementHandle.contentFrame (#276)
This commit is contained in:
parent
4bb3c41faa
commit
e851a27350
@ -10,7 +10,7 @@
|
|||||||
"playwright": {
|
"playwright": {
|
||||||
"chromium_revision": "724623",
|
"chromium_revision": "724623",
|
||||||
"firefox_revision": "1007",
|
"firefox_revision": "1007",
|
||||||
"webkit_revision": "1042"
|
"webkit_revision": "1043"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"unit": "node test/test.js",
|
"unit": "node test/test.js",
|
||||||
|
@ -384,7 +384,12 @@ export class FrameManager implements PageDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getContentFrame(handle: dom.ElementHandle): Promise<frames.Frame | null> {
|
async getContentFrame(handle: dom.ElementHandle): Promise<frames.Frame | null> {
|
||||||
throw new Error('contentFrame() is not implemented');
|
const nodeInfo = await this._session.send('DOM.describeNode', {
|
||||||
|
objectId: toRemoteObject(handle).objectId
|
||||||
|
});
|
||||||
|
if (!nodeInfo.contentFrameId)
|
||||||
|
return null;
|
||||||
|
return this._page._frameManager.frame(nodeInfo.contentFrameId);
|
||||||
}
|
}
|
||||||
|
|
||||||
isElementHandle(remoteObject: any): boolean {
|
isElementHandle(remoteObject: any): boolean {
|
||||||
|
@ -67,7 +67,7 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe.skip(WEBKIT)('ElementHandle.contentFrame', function() {
|
describe('ElementHandle.contentFrame', function() {
|
||||||
it('should work', async({page,server}) => {
|
it('should work', async({page,server}) => {
|
||||||
await page.goto(server.EMPTY_PAGE);
|
await page.goto(server.EMPTY_PAGE);
|
||||||
await utils.attachFrame(page, 'frame1', server.EMPTY_PAGE);
|
await utils.attachFrame(page, 'frame1', server.EMPTY_PAGE);
|
||||||
|
Loading…
Reference in New Issue
Block a user