2020-06-04 14:56:45 +00:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [puppeteer ](./puppeteer.md ) > [Frame ](./puppeteer.frame.md ) > [evaluate ](./puppeteer.frame.evaluate.md )
## Frame.evaluate() method
< b > Signature:< / b >
```typescript
evaluate< ReturnType extends any > (pageFunction: Function | string, ...args: unknown[]): Promise< ReturnType > ;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2020-07-09 13:22:58 +00:00
| pageFunction | Function \| string | a function that is run within the frame |
| args | unknown\[\] | arguments to be passed to the pageFunction |
2020-06-04 14:56:45 +00:00
< b > Returns:< / b >
Promise< ReturnType>
2020-07-09 13:22:58 +00:00
## Remarks
This method behaves identically to [Page.evaluate() ](./puppeteer.page.evaluate.md ) except it's run within the context of the `frame` <!-- --> , rather than the entire page.