This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Support page.mainFrame().evaluateHandle('document') #51
Labels
enhancement
New feature or request
Comments
Bnaya
changed the title
Wrap page.mainFrame().evaluateHandle('document')
Support page.mainFrame().evaluateHandle('document')
Oct 6, 2020
Copied for convenience. export async function getDocument(_page?: Page): Promise<ElementHandle> {
// @ts-ignore
const page: Page = _page || this
const documentHandle = await page.mainFrame().evaluateHandle('document')
const document = documentHandle.asElement()
if (!document) throw new Error('Could not find document')
return document
} @Bnaya How do you imagine this being instrumented? what would be the outcome? |
I think that if we wrap mainFrame, frames and evaluateHandle can do |
Doesn't it mean we just have to add the method names here? |
Yes, kinda :) |
Oh and also, since you're using |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Calls to
page.mainFrame()
and Element handles acquired by frames, are not instrumentedAs in use in:
https://github.com/hoverinc/playwright-testing-library/blob/master/lib/index.ts#L147-L153
The text was updated successfully, but these errors were encountered: