Creates and returns a new Page in a new BrowserContext if a BrowserContext hasn't already been initialized for the Browser. If a BrowserContext has already been initialized an error is thrown.
noteA 1-to-1 mapping between Browser and BrowserContext means you cannot run BrowserContexts concurrently. Due to this restriction, if one already exists, it must be retrieved and closed first before creating a new one.
attentionPages that have been opened ought to be closed using Page.close. Pages left open could potentially distort the results of Web Vital metrics.
Parameter | Type | Default | Description |
---|---|---|---|
options | object | null |
Returns
Type | Description |
---|---|
object | Page object |