--- sidebar_label: Page.waitForFrame --- # Page.waitForFrame() method Waits for a frame matching the given conditions to appear. #### Signature: ```typescript class Page { waitForFrame( urlOrPredicate: string | ((frame: Frame) => Awaitable), options?: WaitTimeoutOptions ): Promise; } ``` ## Parameters
Parameter Type Description
urlOrPredicate string \| ((frame: [Frame](./puppeteer.frame.md)) => [Awaitable](./puppeteer.awaitable.md)<boolean>)
options [WaitTimeoutOptions](./puppeteer.waittimeoutoptions.md) _(Optional)_
**Returns:** Promise<[Frame](./puppeteer.frame.md)> ## Example ```ts const frame = await page.waitForFrame(async frame => { return frame.name() === 'Test'; }); ```