From 1a05d37cf26562283a0e8ef8d419b8553d630dc1 Mon Sep 17 00:00:00 2001 From: jrandolf <101637635+jrandolf@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:44:42 +0100 Subject: [PATCH] chore: remove `skip` and add more `frame.name()` instructions (#12085) --- docs/api/puppeteer.frame.name.md | 2 +- packages/puppeteer-core/src/api/Frame.ts | 2 +- test/src/launcher.spec.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/puppeteer.frame.name.md b/docs/api/puppeteer.frame.name.md index 52e6971bb23..6f7bae12b6f 100644 --- a/docs/api/puppeteer.frame.name.md +++ b/docs/api/puppeteer.frame.name.md @@ -10,7 +10,7 @@ sidebar_label: Frame.name > > ```ts > const element = await frame.frameElement(); -> const name = await element.evaluate(frame => frame.name); +> const nameOrId = await element.evaluate(frame => frame.name ?? frame.id); > ``` The frame's `name` attribute as specified in the tag. diff --git a/packages/puppeteer-core/src/api/Frame.ts b/packages/puppeteer-core/src/api/Frame.ts index abcd0fdc239..8358482f2de 100644 --- a/packages/puppeteer-core/src/api/Frame.ts +++ b/packages/puppeteer-core/src/api/Frame.ts @@ -765,7 +765,7 @@ export abstract class Frame extends EventEmitter { * * ```ts * const element = await frame.frameElement(); - * const name = await element.evaluate(frame => frame.name); + * const nameOrId = await element.evaluate(frame => frame.name ?? frame.id); * ``` */ name(): string { diff --git a/test/src/launcher.spec.ts b/test/src/launcher.spec.ts index 348ac402969..80fc4caf6ca 100644 --- a/test/src/launcher.spec.ts +++ b/test/src/launcher.spec.ts @@ -777,7 +777,7 @@ describe('Launcher specs', function () { await close(); } }); - it.skip('should be able to reconnect to a disconnected browser', async () => { + it('should be able to reconnect to a disconnected browser', async () => { const {puppeteer, server, browser, close} = await launch({}); try { const browserWSEndpoint = browser.wsEndpoint();