<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) > [puppeteer](./puppeteer.md) > [Page](./puppeteer.page.md) > [waitForFunction](./puppeteer.page.waitforfunction.md) ## Page.waitForFunction() method <b>Signature:</b> ```typescript waitForFunction(pageFunction: Function | string, options?: { timeout?: number; polling?: string | number; }, ...args: SerializableOrJSHandle[]): Promise<JSHandle>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | pageFunction | Function \| string | | | options | { timeout?: number; polling?: string \| number; } | | | args | [SerializableOrJSHandle](./puppeteer.serializableorjshandle.md)<!-- -->\[\] | | <b>Returns:</b> Promise<[JSHandle](./puppeteer.jshandle.md)<!-- -->>