<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Page](./puppeteer.page.md) &gt; [addScriptTag](./puppeteer.page.addscripttag.md)

## Page.addScriptTag() method

Adds a `<script>` tag into the page with the desired URL or content.

<b>Signature:</b>

```typescript
addScriptTag(options: {
        url?: string;
        path?: string;
        content?: string;
        type?: string;
    }): Promise<ElementHandle>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  options | { url?: string; path?: string; content?: string; type?: string; } |  |

<b>Returns:</b>

Promise&lt;[ElementHandle](./puppeteer.elementhandle.md)&gt;

Promise which resolves to the added tag when the script's onload fires or when the script content was injected into frame.

## Remarks

Shortcut for [page.mainFrame().addScriptTag(options)](./puppeteer.frame.addscripttag.md).

