Update test.ts

This commit is contained in:
Max Schmitt 2024-03-18 05:37:16 +01:00 committed by GitHub
parent 675b97fb8b
commit 1d59d2393a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -331,9 +331,9 @@ playwright.chromium.launch().then(async browser => {
} }
// evaluteHandle with two different return types (ElementHandle) // evaluteHandle with two different return types (ElementHandle)
{ {
const handle = await page.evaluateHandle(() => '' as HTMLInputElement | HTMLTextAreaElement); const handle = await page.evaluateHandle(() => '' as any as HTMLInputElement | HTMLTextAreaElement);
await handle.evaluate(element => element.value); await handle.evaluate(element => element.value);
const assertion: AssertType<ElementHandle<HTMLInputElement | HTMLTextAreaElement>, typeof handle> = true; const assertion: AssertType<playwright.ElementHandle<HTMLInputElement | HTMLTextAreaElement>, typeof handle> = true;
} }