diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4eae6462969..16c5e5b1768 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,6 @@ { - "packages/puppeteer": "22.6.0", - "packages/puppeteer-core": "22.6.0", + "packages/puppeteer": "22.6.1", + "packages/puppeteer-core": "22.6.1", "packages/testserver": "0.6.0", "packages/ng-schematics": "0.6.0", "packages/browsers": "2.2.0" diff --git a/package-lock.json b/package-lock.json index e867c7966ac..17e4ad5f613 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12157,14 +12157,14 @@ } }, "packages/puppeteer": { - "version": "22.6.0", + "version": "22.6.1", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@puppeteer/browsers": "2.2.0", "cosmiconfig": "9.0.0", "devtools-protocol": "0.0.1262051", - "puppeteer-core": "22.6.0" + "puppeteer-core": "22.6.1" }, "bin": { "puppeteer": "lib/esm/puppeteer/node/cli.js" @@ -12177,7 +12177,7 @@ } }, "packages/puppeteer-core": { - "version": "22.6.0", + "version": "22.6.1", "license": "Apache-2.0", "dependencies": { "@puppeteer/browsers": "2.2.0", diff --git a/packages/puppeteer-core/CHANGELOG.md b/packages/puppeteer-core/CHANGELOG.md index fd84b63610a..bf652009fe9 100644 --- a/packages/puppeteer-core/CHANGELOG.md +++ b/packages/puppeteer-core/CHANGELOG.md @@ -20,6 +20,15 @@ All notable changes to this project will be documented in this file. See [standa * dependencies * @puppeteer/browsers bumped from 1.5.1 to 1.6.0 +## [22.6.1](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v22.6.0...puppeteer-core-v22.6.1) (2024-03-25) + + +### Bug Fixes + +* apply timeout to waiting for a response ([#12142](https://github.com/puppeteer/puppeteer/issues/12142)) ([ac1767d](https://github.com/puppeteer/puppeteer/commit/ac1767da0b4214ced548a62dd737e2863f92c715)) +* reload should not resolve early on fragment navigations ([#12119](https://github.com/puppeteer/puppeteer/issues/12119)) ([d476031](https://github.com/puppeteer/puppeteer/commit/d4760317c9bd359c9ecdb5f36231449dae16a8d2)) +* support clip in ElementHandle.screenshot ([#12115](https://github.com/puppeteer/puppeteer/issues/12115)) ([b096ffa](https://github.com/puppeteer/puppeteer/commit/b096ffaa0359078bd5748b53b67e87c9453c7196)) + ## [22.6.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v22.5.0...puppeteer-core-v22.6.0) (2024-03-20) diff --git a/packages/puppeteer-core/package.json b/packages/puppeteer-core/package.json index c81e3ea2476..8d4ef442fda 100644 --- a/packages/puppeteer-core/package.json +++ b/packages/puppeteer-core/package.json @@ -1,6 +1,6 @@ { "name": "puppeteer-core", - "version": "22.6.0", + "version": "22.6.1", "description": "A high-level API to control headless Chrome over the DevTools Protocol", "keywords": [ "puppeteer", diff --git a/packages/puppeteer/CHANGELOG.md b/packages/puppeteer/CHANGELOG.md index 91ab1cbf18c..1b7b673f889 100644 --- a/packages/puppeteer/CHANGELOG.md +++ b/packages/puppeteer/CHANGELOG.md @@ -29,6 +29,20 @@ All notable changes to this project will be documented in this file. See [standa * puppeteer-core bumped from 21.0.2 to 21.0.3 * @puppeteer/browsers bumped from 1.5.1 to 1.6.0 +## [22.6.1](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.6.0...puppeteer-v22.6.1) (2024-03-25) + + +### Miscellaneous Chores + +* **puppeteer:** Synchronize puppeteer versions + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * puppeteer-core bumped from 22.6.0 to 22.6.1 + ## [22.6.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.5.0...puppeteer-v22.6.0) (2024-03-20) diff --git a/packages/puppeteer/package.json b/packages/puppeteer/package.json index 9f4fcaa44a3..3d532276c54 100644 --- a/packages/puppeteer/package.json +++ b/packages/puppeteer/package.json @@ -1,6 +1,6 @@ { "name": "puppeteer", - "version": "22.6.0", + "version": "22.6.1", "description": "A high-level API to control headless Chrome over the DevTools Protocol", "keywords": [ "puppeteer", @@ -124,7 +124,7 @@ "license": "Apache-2.0", "dependencies": { "cosmiconfig": "9.0.0", - "puppeteer-core": "22.6.0", + "puppeteer-core": "22.6.1", "@puppeteer/browsers": "2.2.0", "devtools-protocol": "0.0.1262051" }, diff --git a/website/versioned_docs/version-22.6.0/api/index.md b/website/versioned_docs/version-22.6.0/api/index.md deleted file mode 100644 index 0f34dd4a558..00000000000 --- a/website/versioned_docs/version-22.6.0/api/index.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -sidebar_label: API ---- - -# API Reference - -## Classes - -| Class | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Accessibility](./puppeteer.accessibility.md) | The Accessibility class provides methods for inspecting the browser's accessibility tree. The accessibility tree is used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or [switches](https://en.wikipedia.org/wiki/Switch_access). | -| [Browser](./puppeteer.browser.md) |

[Browser](./puppeteer.browser.md) represents a browser instance that is either:

- connected to via [Puppeteer.connect()](./puppeteer.puppeteer.connect.md) or - launched by [PuppeteerNode.launch()](./puppeteer.puppeteernode.launch.md).

[Browser](./puppeteer.browser.md) [emits](./puppeteer.eventemitter.md) various events which are documented in the [BrowserEvent](./puppeteer.browserevent.md) enum.

| -| [BrowserContext](./puppeteer.browsercontext.md) |

[BrowserContext](./puppeteer.browsercontext.md) represents individual user contexts within a [browser](./puppeteer.browser.md).

When a [browser](./puppeteer.browser.md) is launched, it has a single [browser context](./puppeteer.browsercontext.md) by default. Others can be created using [Browser.createBrowserContext()](./puppeteer.browser.createbrowsercontext.md). Each context has isolated storage (cookies/localStorage/etc.)

[BrowserContext](./puppeteer.browsercontext.md) [emits](./puppeteer.eventemitter.md) various events which are documented in the [BrowserContextEvent](./puppeteer.browsercontextevent.md) enum.

If a [page](./puppeteer.page.md) opens another [page](./puppeteer.page.md), e.g. using window.open, the popup will belong to the parent [page's browser context](./puppeteer.page.browsercontext.md).

| -| [CDPSession](./puppeteer.cdpsession.md) | The CDPSession instances are used to talk raw Chrome Devtools Protocol. | -| [Connection](./puppeteer.connection.md) | | -| [ConsoleMessage](./puppeteer.consolemessage.md) | ConsoleMessage objects are dispatched by page via the 'console' event. | -| [Coverage](./puppeteer.coverage.md) | The Coverage class provides methods to gather information about parts of JavaScript and CSS that were used by the page. | -| [CSSCoverage](./puppeteer.csscoverage.md) | | -| [DeviceRequestPrompt](./puppeteer.devicerequestprompt.md) | Device request prompts let you respond to the page requesting for a device through an API like WebBluetooth. | -| [DeviceRequestPromptDevice](./puppeteer.devicerequestpromptdevice.md) | Device in a request prompt. | -| [Dialog](./puppeteer.dialog.md) | Dialog instances are dispatched by the [Page](./puppeteer.page.md) via the dialog event. | -| [ElementHandle](./puppeteer.elementhandle.md) | ElementHandle represents an in-page DOM element. | -| [EventEmitter](./puppeteer.eventemitter.md) | The EventEmitter class that many Puppeteer classes extend. | -| [FileChooser](./puppeteer.filechooser.md) | File choosers let you react to the page requesting for a file. | -| [Frame](./puppeteer.frame.md) |

Represents a DOM frame.

To understand frames, you can think of frames as <iframe> elements. Just like iframes, frames can be nested, and when JavaScript is executed in a frame, the JavaScript does not effect frames inside the ambient frame the JavaScript executes in.

| -| [HTTPRequest](./puppeteer.httprequest.md) | Represents an HTTP request sent by a page. | -| [HTTPResponse](./puppeteer.httpresponse.md) | The HTTPResponse class represents responses which are received by the [Page](./puppeteer.page.md) class. | -| [JSCoverage](./puppeteer.jscoverage.md) | | -| [JSHandle](./puppeteer.jshandle.md) |

Represents a reference to a JavaScript object. Instances can be created using [Page.evaluateHandle()](./puppeteer.page.evaluatehandle.md).

Handles prevent the referenced JavaScript object from being garbage-collected unless the handle is purposely [disposed](./puppeteer.jshandle.dispose.md). JSHandles are auto-disposed when their associated frame is navigated away or the parent context gets destroyed.

Handles can be used as arguments for any evaluation function such as [Page.$eval()](./puppeteer.page._eval.md), [Page.evaluate()](./puppeteer.page.evaluate.md), and [Page.evaluateHandle()](./puppeteer.page.evaluatehandle.md). They are resolved to their referenced object.

| -| [Keyboard](./puppeteer.keyboard.md) | Keyboard provides an api for managing a virtual keyboard. The high level api is [Keyboard.type()](./puppeteer.keyboard.type.md), which takes raw characters and generates proper keydown, keypress/input, and keyup events on your page. | -| [Locator](./puppeteer.locator.md) | Locators describe a strategy of locating objects and performing an action on them. If the action fails because the object is not ready for the action, the whole operation is retried. Various preconditions for a successful action are checked automatically. | -| [Mouse](./puppeteer.mouse.md) | The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport. | -| [Page](./puppeteer.page.md) |

Page provides methods to interact with a single tab or [extension background page](https://developer.chrome.com/extensions/background_pages) in the browser.

:::note

One Browser instance might have multiple Page instances.

:::

| -| [ProductLauncher](./puppeteer.productlauncher.md) | Describes a launcher - a class that is able to create and launch a browser instance. | -| [ProtocolError](./puppeteer.protocolerror.md) | ProtocolError is emitted whenever there is an error from the protocol. | -| [Puppeteer](./puppeteer.puppeteer.md) |

The main Puppeteer class.

IMPORTANT: if you are using Puppeteer in a Node environment, you will get an instance of [PuppeteerNode](./puppeteer.puppeteernode.md) when you import or require puppeteer. That class extends Puppeteer, so has all the methods documented below as well as all that are defined on [PuppeteerNode](./puppeteer.puppeteernode.md).

| -| [PuppeteerError](./puppeteer.puppeteererror.md) | The base class for all Puppeteer-specific errors | -| [PuppeteerNode](./puppeteer.puppeteernode.md) |

Extends the main [Puppeteer](./puppeteer.puppeteer.md) class with Node specific behaviour for fetching and downloading browsers.

If you're using Puppeteer in a Node environment, this is the class you'll get when you run require('puppeteer') (or the equivalent ES import).

| -| [ScreenRecorder](./puppeteer.screenrecorder.md) | | -| [SecurityDetails](./puppeteer.securitydetails.md) | The SecurityDetails class represents the security details of a response that was received over a secure connection. | -| [Target](./puppeteer.target.md) | Target represents a [CDP target](https://chromedevtools.github.io/devtools-protocol/tot/Target/). In CDP a target is something that can be debugged such a frame, a page or a worker. | -| [TimeoutError](./puppeteer.timeouterror.md) | TimeoutError is emitted whenever certain operations are terminated due to timeout. | -| [Touchscreen](./puppeteer.touchscreen.md) | The Touchscreen class exposes touchscreen events. | -| [Tracing](./puppeteer.tracing.md) | The Tracing class exposes the tracing audit interface. | -| [UnsupportedOperation](./puppeteer.unsupportedoperation.md) | Puppeteer will throw this error if a method is not supported by the currently used protocol | -| [WebWorker](./puppeteer.webworker.md) | This class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API). | - -## Enumerations - -| Enumeration | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| [BrowserContextEvent](./puppeteer.browsercontextevent.md) | | -| [BrowserEvent](./puppeteer.browserevent.md) | All the events a [browser instance](./puppeteer.browser.md) may emit. | -| [InterceptResolutionAction](./puppeteer.interceptresolutionaction.md) | | -| [LocatorEvent](./puppeteer.locatorevent.md) | All the events that a locator instance may emit. | -| [PageEvent](./puppeteer.pageevent.md) | All the events that a page instance may emit. | -| [TargetType](./puppeteer.targettype.md) | | - -## Functions - -| Function | Description | -| -------------------------------------------------------------------------------------- | ----------- | -| [clearCustomQueryHandlers()](./puppeteer.clearcustomqueryhandlers.md) | | -| [connect(options)](./puppeteer.connect.md) | | -| [customQueryHandlerNames()](./puppeteer.customqueryhandlernames.md) | | -| [defaultArgs(options)](./puppeteer.defaultargs.md) | | -| [executablePath(channel)](./puppeteer.executablepath.md) | | -| [launch(options)](./puppeteer.launch.md) | | -| [registerCustomQueryHandler(name, handler)](./puppeteer.registercustomqueryhandler.md) | | -| [trimCache()](./puppeteer.trimcache.md) | | -| [unregisterCustomQueryHandler(name)](./puppeteer.unregistercustomqueryhandler.md) | | - -## Interfaces - -| Interface | Description | -| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [ActionOptions](./puppeteer.actionoptions.md) | | -| [AutofillData](./puppeteer.autofilldata.md) | | -| [BoundingBox](./puppeteer.boundingbox.md) | | -| [BoxModel](./puppeteer.boxmodel.md) | | -| [BrowserConnectOptions](./puppeteer.browserconnectoptions.md) | Generic browser options that can be passed when launching any browser or when connecting to an existing browser instance. | -| [BrowserContextEvents](./puppeteer.browsercontextevents.md) | | -| [BrowserContextOptions](./puppeteer.browsercontextoptions.md) | | -| [BrowserEvents](./puppeteer.browserevents.md) | | -| [BrowserLaunchArgumentOptions](./puppeteer.browserlaunchargumentoptions.md) | Launcher options that only apply to Chrome. | -| [CDPSessionEvents](./puppeteer.cdpsessionevents.md) | | -| [ClickOptions](./puppeteer.clickoptions.md) | | -| [CommandOptions](./puppeteer.commandoptions.md) | | -| [CommonEventEmitter](./puppeteer.commoneventemitter.md) | | -| [Configuration](./puppeteer.configuration.md) |

Defines options to configure Puppeteer's behavior during installation and runtime.

See individual properties for more information.

| -| [ConnectionTransport](./puppeteer.connectiontransport.md) | | -| [ConnectOptions](./puppeteer.connectoptions.md) | | -| [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) | | -| [ContinueRequestOverrides](./puppeteer.continuerequestoverrides.md) | | -| [Cookie](./puppeteer.cookie.md) | Represents a cookie object. | -| [CookieParam](./puppeteer.cookieparam.md) | Cookie parameter object | -| [CoverageEntry](./puppeteer.coverageentry.md) | The CoverageEntry class represents one entry of the coverage report. | -| [Credentials](./puppeteer.credentials.md) | | -| [CSSCoverageOptions](./puppeteer.csscoverageoptions.md) | Set of configurable options for CSS coverage. | -| [CustomQueryHandler](./puppeteer.customqueryhandler.md) | | -| [DebugInfo](./puppeteer.debuginfo.md) | | -| [DeleteCookiesRequest](./puppeteer.deletecookiesrequest.md) | | -| [Device](./puppeteer.device.md) | | -| [ElementScreenshotOptions](./puppeteer.elementscreenshotoptions.md) | | -| [FrameAddScriptTagOptions](./puppeteer.frameaddscripttagoptions.md) | | -| [FrameAddStyleTagOptions](./puppeteer.frameaddstyletagoptions.md) | | -| [FrameEvents](./puppeteer.frameevents.md) | | -| [FrameWaitForFunctionOptions](./puppeteer.framewaitforfunctionoptions.md) | | -| [GeolocationOptions](./puppeteer.geolocationoptions.md) | | -| [GoToOptions](./puppeteer.gotooptions.md) | | -| [InterceptResolutionState](./puppeteer.interceptresolutionstate.md) | | -| [InternalNetworkConditions](./puppeteer.internalnetworkconditions.md) | | -| [JSCoverageEntry](./puppeteer.jscoverageentry.md) | The CoverageEntry class for JavaScript | -| [JSCoverageOptions](./puppeteer.jscoverageoptions.md) | Set of configurable options for JS coverage. | -| [KeyboardTypeOptions](./puppeteer.keyboardtypeoptions.md) | | -| [KeyDownOptions](./puppeteer.keydownoptions.md) | | -| [LaunchOptions](./puppeteer.launchoptions.md) | Generic launch options that can be passed when launching any browser. | -| [LocatorEvents](./puppeteer.locatorevents.md) | | -| [LocatorOptions](./puppeteer.locatoroptions.md) | | -| [LocatorScrollOptions](./puppeteer.locatorscrolloptions.md) | | -| [MediaFeature](./puppeteer.mediafeature.md) | | -| [Metrics](./puppeteer.metrics.md) | | -| [MouseClickOptions](./puppeteer.mouseclickoptions.md) | | -| [MouseMoveOptions](./puppeteer.mousemoveoptions.md) | | -| [MouseOptions](./puppeteer.mouseoptions.md) | | -| [MouseWheelOptions](./puppeteer.mousewheeloptions.md) | | -| [Moveable](./puppeteer.moveable.md) | | -| [NetworkConditions](./puppeteer.networkconditions.md) | | -| [NewDocumentScriptEvaluation](./puppeteer.newdocumentscriptevaluation.md) | | -| [Offset](./puppeteer.offset.md) | | -| [PageEvents](./puppeteer.pageevents.md) |

Denotes the objects received by callback functions for page events.

See [PageEvent](./puppeteer.pageevent.md) for more detail on the events and when they are emitted.

| -| [PDFMargin](./puppeteer.pdfmargin.md) | | -| [PDFOptions](./puppeteer.pdfoptions.md) | Valid options to configure PDF generation via [Page.pdf()](./puppeteer.page.pdf.md). | -| [Point](./puppeteer.point.md) | | -| [PuppeteerLaunchOptions](./puppeteer.puppeteerlaunchoptions.md) | | -| [RemoteAddress](./puppeteer.remoteaddress.md) | | -| [ResponseForRequest](./puppeteer.responseforrequest.md) | Required response data to fulfill a request with. | -| [ScreencastOptions](./puppeteer.screencastoptions.md) | | -| [ScreenshotClip](./puppeteer.screenshotclip.md) | | -| [ScreenshotOptions](./puppeteer.screenshotoptions.md) | | -| [SerializedAXNode](./puppeteer.serializedaxnode.md) | Represents a Node and the properties of it that are relevant to Accessibility. | -| [SnapshotOptions](./puppeteer.snapshotoptions.md) | | -| [TracingOptions](./puppeteer.tracingoptions.md) | | -| [Viewport](./puppeteer.viewport.md) | | -| [WaitForNetworkIdleOptions](./puppeteer.waitfornetworkidleoptions.md) | | -| [WaitForOptions](./puppeteer.waitforoptions.md) | | -| [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md) | | -| [WaitForTargetOptions](./puppeteer.waitfortargetoptions.md) | | -| [WaitTimeoutOptions](./puppeteer.waittimeoutoptions.md) | | - -## Namespaces - -| Namespace | Description | -| ------------------------------------------------- | --------------------------------------- | -| [CDPSessionEvent](./puppeteer.cdpsessionevent.md) | Events that the CDPSession class emits. | - -## Variables - -| Variable | Description | -| --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| [DEFAULT_INTERCEPT_RESOLUTION_PRIORITY](./puppeteer.default_intercept_resolution_priority.md) | The default cooperative request interception resolution priority | -| [KnownDevices](./puppeteer.knowndevices.md) | A list of devices to be used with [Page.emulate()](./puppeteer.page.emulate.md). | -| [MouseButton](./puppeteer.mousebutton.md) | Enum of valid mouse buttons. | -| [PredefinedNetworkConditions](./puppeteer.predefinednetworkconditions.md) | A list of network conditions to be used with [Page.emulateNetworkConditions()](./puppeteer.page.emulatenetworkconditions.md). | -| [puppeteer](./puppeteer.puppeteer.md) | | - -## Type Aliases - -| Type Alias | Description | -| ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [ActionResult](./puppeteer.actionresult.md) | | -| [Awaitable](./puppeteer.awaitable.md) | | -| [AwaitableIterable](./puppeteer.awaitableiterable.md) | | -| [AwaitablePredicate](./puppeteer.awaitablepredicate.md) | | -| [AwaitedLocator](./puppeteer.awaitedlocator.md) | | -| [CDPEvents](./puppeteer.cdpevents.md) | | -| [ChromeReleaseChannel](./puppeteer.chromereleasechannel.md) | | -| [ConsoleMessageType](./puppeteer.consolemessagetype.md) | The supported types for console messages. | -| [CookiePriority](./puppeteer.cookiepriority.md) | Represents the cookie's 'Priority' status: https://tools.ietf.org/html/draft-west-cookie-priority-00 | -| [CookieSameSite](./puppeteer.cookiesamesite.md) | Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies | -| [CookieSourceScheme](./puppeteer.cookiesourcescheme.md) | Represents the source scheme of the origin that originally set the cookie. A value of "Unset" allows protocol clients to emulate legacy cookie scope for the scheme. This is a temporary ability and it will be removed in the future. | -| [ElementFor](./puppeteer.elementfor.md) | | -| [ErrorCode](./puppeteer.errorcode.md) | | -| [EvaluateFunc](./puppeteer.evaluatefunc.md) | | -| [EvaluateFuncWith](./puppeteer.evaluatefuncwith.md) | | -| [EventsWithWildcard](./puppeteer.eventswithwildcard.md) | | -| [EventType](./puppeteer.eventtype.md) | | -| [ExperimentsConfiguration](./puppeteer.experimentsconfiguration.md) |

Defines experiment options for Puppeteer.

See individual properties for more information.

| -| [FlattenHandle](./puppeteer.flattenhandle.md) | | -| [HandleFor](./puppeteer.handlefor.md) | | -| [HandleOr](./puppeteer.handleor.md) | | -| [Handler](./puppeteer.handler.md) | | -| [InnerParams](./puppeteer.innerparams.md) | | -| [KeyInput](./puppeteer.keyinput.md) | All the valid keys that can be passed to functions that take user input, such as [keyboard.press](./puppeteer.keyboard.press.md) | -| [KeyPressOptions](./puppeteer.keypressoptions.md) | | -| [LocatorClickOptions](./puppeteer.locatorclickoptions.md) | | -| [LowerCasePaperFormat](./puppeteer.lowercasepaperformat.md) | | -| [Mapper](./puppeteer.mapper.md) | | -| [MouseButton](./puppeteer.mousebutton.md) | | -| [NodeFor](./puppeteer.nodefor.md) | | -| [PaperFormat](./puppeteer.paperformat.md) | All the valid paper format types when printing a PDF. | -| [Permission](./puppeteer.permission.md) | | -| [Predicate](./puppeteer.predicate.md) | | -| [Product](./puppeteer.product.md) | Supported products. | -| [ProtocolLifeCycleEvent](./puppeteer.protocollifecycleevent.md) | | -| [ProtocolType](./puppeteer.protocoltype.md) | | -| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) | | -| [PuppeteerNodeLaunchOptions](./puppeteer.puppeteernodelaunchoptions.md) | Utility type exposed to enable users to define options that can be passed to puppeteer.launch without having to list the set of all types. | -| [Quad](./puppeteer.quad.md) | | -| [ResourceType](./puppeteer.resourcetype.md) | Resource types for HTTPRequests as perceived by the rendering engine. | -| [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | | -| [VisibilityOption](./puppeteer.visibilityoption.md) | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.actionoptions.md b/website/versioned_docs/version-22.6.0/api/puppeteer.actionoptions.md deleted file mode 100644 index 2201b476edb..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.actionoptions.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -sidebar_label: ActionOptions ---- - -# ActionOptions interface - -#### Signature: - -```typescript -export interface ActionOptions -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------------------- | ----------- | ----------- | ------- | -| signal | optional | AbortSignal | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.autofilldata.md b/website/versioned_docs/version-22.6.0/api/puppeteer.autofilldata.md deleted file mode 100644 index b7c2e88f031..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.autofilldata.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -sidebar_label: AutofillData ---- - -# AutofillData interface - -#### Signature: - -```typescript -export interface AutofillData -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| ---------- | --------- | ------------------------------------------------------------------------------------------------- | ----------- | ------- | -| creditCard | | { number: string; name: string; expiryMonth: string; expiryYear: string; cvc: string; } | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.boundingbox.md b/website/versioned_docs/version-22.6.0/api/puppeteer.boundingbox.md deleted file mode 100644 index 4b813816575..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.boundingbox.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -sidebar_label: BoundingBox ---- - -# BoundingBox interface - -#### Signature: - -```typescript -export interface BoundingBox extends Point -``` - -**Extends:** [Point](./puppeteer.point.md) - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------- | ------ | ------------------------------------ | ------- | -| height | | number | the height of the element in pixels. | | -| width | | number | the width of the element in pixels. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.boxmodel.md b/website/versioned_docs/version-22.6.0/api/puppeteer.boxmodel.md deleted file mode 100644 index e30accd8225..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.boxmodel.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_label: BoxModel ---- - -# BoxModel interface - -#### Signature: - -```typescript -export interface BoxModel -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------- | --------------------------- | ----------- | ------- | -| border | | [Quad](./puppeteer.quad.md) | | | -| content | | [Quad](./puppeteer.quad.md) | | | -| height | | number | | | -| margin | | [Quad](./puppeteer.quad.md) | | | -| padding | | [Quad](./puppeteer.quad.md) | | | -| width | | number | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.browser.md b/website/versioned_docs/version-22.6.0/api/puppeteer.browser.md deleted file mode 100644 index 4410e56ef20..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.browser.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -sidebar_label: Browser ---- - -# Browser class - -[Browser](./puppeteer.browser.md) represents a browser instance that is either: - -- connected to via [Puppeteer.connect()](./puppeteer.puppeteer.connect.md) or - launched by [PuppeteerNode.launch()](./puppeteer.puppeteernode.launch.md). - -[Browser](./puppeteer.browser.md) [emits](./puppeteer.eventemitter.md) various events which are documented in the [BrowserEvent](./puppeteer.browserevent.md) enum. - -#### Signature: - -```typescript -export declare abstract class Browser extends EventEmitter -``` - -**Extends:** [EventEmitter](./puppeteer.eventemitter.md)<[BrowserEvents](./puppeteer.browserevents.md)> - -## Remarks - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Browser` class. - -## Example 1 - -Using a [Browser](./puppeteer.browser.md) to create a [Page](./puppeteer.page.md): - -```ts -import puppeteer from 'puppeteer'; - -const browser = await puppeteer.launch(); -const page = await browser.newPage(); -await page.goto('https://example.com'); -await browser.close(); -``` - -## Example 2 - -Disconnecting from and reconnecting to a [Browser](./puppeteer.browser.md): - -```ts -import puppeteer from 'puppeteer'; - -const browser = await puppeteer.launch(); -// Store the endpoint to be able to reconnect to the browser. -const browserWSEndpoint = browser.wsEndpoint(); -// Disconnect puppeteer from the browser. -await browser.disconnect(); - -// Use the endpoint to reestablish a connection -const browser2 = await puppeteer.connect({browserWSEndpoint}); -// Close the browser. -await browser2.close(); -``` - -## Properties - -| Property | Modifiers | Type | Description | -| --------- | --------------------- | ------------------------------------- | ------------------------------------------------------------------------- | -| connected | readonly | boolean | Whether Puppeteer is connected to this [browser](./puppeteer.browser.md). | -| debugInfo | readonly | [DebugInfo](./puppeteer.debuginfo.md) | Get debug information from Puppeteer. | - -## Methods - -| Method | Modifiers | Description | -| ---------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [browserContexts()](./puppeteer.browser.browsercontexts.md) | |

Gets a list of open [browser contexts](./puppeteer.browsercontext.md).

In a newly-created [browser](./puppeteer.browser.md), this will return a single instance of [BrowserContext](./puppeteer.browsercontext.md).

| -| [close()](./puppeteer.browser.close.md) | | Closes this [browser](./puppeteer.browser.md) and all associated [pages](./puppeteer.page.md). | -| [createBrowserContext(options)](./puppeteer.browser.createbrowsercontext.md) | |

Creates a new [browser context](./puppeteer.browsercontext.md).

This won't share cookies/cache with other [browser contexts](./puppeteer.browsercontext.md).

| -| [defaultBrowserContext()](./puppeteer.browser.defaultbrowsercontext.md) | | Gets the default [browser context](./puppeteer.browsercontext.md). | -| [disconnect()](./puppeteer.browser.disconnect.md) | | Disconnects Puppeteer from this [browser](./puppeteer.browser.md), but leaves the process running. | -| [isConnected()](./puppeteer.browser.isconnected.md) | | Whether Puppeteer is connected to this [browser](./puppeteer.browser.md). | -| [newPage()](./puppeteer.browser.newpage.md) | | Creates a new [page](./puppeteer.page.md) in the [default browser context](./puppeteer.browser.defaultbrowsercontext.md). | -| [pages()](./puppeteer.browser.pages.md) | |

Gets a list of all open [pages](./puppeteer.page.md) inside this [Browser](./puppeteer.browser.md).

If there ar multiple [browser contexts](./puppeteer.browsercontext.md), this returns all [pages](./puppeteer.page.md) in all [browser contexts](./puppeteer.browsercontext.md).

| -| [process()](./puppeteer.browser.process.md) | | Gets the associated [ChildProcess](https://nodejs.org/api/child_process.html#class-childprocess). | -| [target()](./puppeteer.browser.target.md) | | Gets the [target](./puppeteer.target.md) associated with the [default browser context](./puppeteer.browser.defaultbrowsercontext.md)). | -| [targets()](./puppeteer.browser.targets.md) | |

Gets all active [targets](./puppeteer.target.md).

In case of multiple [browser contexts](./puppeteer.browsercontext.md), this returns all [targets](./puppeteer.target.md) in all [browser contexts](./puppeteer.browsercontext.md).

| -| [userAgent()](./puppeteer.browser.useragent.md) | |

Gets this [browser's](./puppeteer.browser.md) original user agent.

[Pages](./puppeteer.page.md) can override the user agent with [Page.setUserAgent()](./puppeteer.page.setuseragent.md).

| -| [version()](./puppeteer.browser.version.md) | |

Gets a string representing this [browser's](./puppeteer.browser.md) name and version.

For headless browser, this is similar to "HeadlessChrome/61.0.3153.0". For non-headless or new-headless, this is similar to "Chrome/61.0.3153.0". For Firefox, it is similar to "Firefox/116.0a1".

The format of [Browser.version()](./puppeteer.browser.version.md) might change with future releases of browsers.

| -| [waitForTarget(predicate, options)](./puppeteer.browser.waitfortarget.md) | |

Waits until a [target](./puppeteer.target.md) matching the given predicate appears and returns it.

This will look all open [browser contexts](./puppeteer.browsercontext.md).

| -| [wsEndpoint()](./puppeteer.browser.wsendpoint.md) | |

Gets the WebSocket URL to connect to this [browser](./puppeteer.browser.md).

This is usually used with [Puppeteer.connect()](./puppeteer.puppeteer.connect.md).

You can find the debugger URL (webSocketDebuggerUrl) from http://HOST:PORT/json/version.

See [browser endpoint](https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target) for more information.

| diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.browserconnectoptions.md b/website/versioned_docs/version-22.6.0/api/puppeteer.browserconnectoptions.md deleted file mode 100644 index a27cf2790e5..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.browserconnectoptions.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -sidebar_label: BrowserConnectOptions ---- - -# BrowserConnectOptions interface - -Generic browser options that can be passed when launching any browser or when connecting to an existing browser instance. - -#### Signature: - -```typescript -export interface BrowserConnectOptions -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| ----------------- | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------- | -| defaultViewport | optional | [Viewport](./puppeteer.viewport.md) \| null | Sets the viewport for each page. | '{width: 800, height: 600}' | -| ignoreHTTPSErrors | optional | boolean | Whether to ignore HTTPS errors during navigation. | false | -| protocol | optional | [ProtocolType](./puppeteer.protocoltype.md) | | 'cdp' | -| protocolTimeout | optional | number | Timeout setting for individual protocol (CDP) calls. | 180_000 | -| slowMo | optional | number | Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | | -| targetFilter | optional | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | Callback to decide if Puppeteer should connect to a given target or not. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontext.md b/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontext.md deleted file mode 100644 index a4ecb95a895..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontext.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -sidebar_label: BrowserContext ---- - -# BrowserContext class - -[BrowserContext](./puppeteer.browsercontext.md) represents individual user contexts within a [browser](./puppeteer.browser.md). - -When a [browser](./puppeteer.browser.md) is launched, it has a single [browser context](./puppeteer.browsercontext.md) by default. Others can be created using [Browser.createBrowserContext()](./puppeteer.browser.createbrowsercontext.md). Each context has isolated storage (cookies/localStorage/etc.) - -[BrowserContext](./puppeteer.browsercontext.md) [emits](./puppeteer.eventemitter.md) various events which are documented in the [BrowserContextEvent](./puppeteer.browsercontextevent.md) enum. - -If a [page](./puppeteer.page.md) opens another [page](./puppeteer.page.md), e.g. using `window.open`, the popup will belong to the parent [page's browser context](./puppeteer.page.browsercontext.md). - -#### Signature: - -```typescript -export declare abstract class BrowserContext extends EventEmitter -``` - -**Extends:** [EventEmitter](./puppeteer.eventemitter.md)<[BrowserContextEvents](./puppeteer.browsercontextevents.md)> - -## Remarks - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `BrowserContext` class. - -## Example - -Creating a new [browser context](./puppeteer.browsercontext.md): - -```ts -// Create a new browser context -const context = await browser.createBrowserContext(); -// Create a new page inside context. -const page = await context.newPage(); -// ... do stuff with page ... -await page.goto('https://example.com'); -// Dispose context once it's no longer needed. -await context.close(); -``` - -## Properties - -| Property | Modifiers | Type | Description | -| -------- | --------------------- | ------------------- | ------------------------------------------------------------------------ | -| closed | readonly | boolean | Whether this [browser context](./puppeteer.browsercontext.md) is closed. | -| id | readonly | string \| undefined | Identifier for this [browser context](./puppeteer.browsercontext.md). | - -## Methods - -| Method | Modifiers | Description | -| --------------------------------------------------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [browser()](./puppeteer.browsercontext.browser.md) | | Gets the [browser](./puppeteer.browser.md) associated with this [browser context](./puppeteer.browsercontext.md). | -| [clearPermissionOverrides()](./puppeteer.browsercontext.clearpermissionoverrides.md) | | Clears all permission overrides for this [browser context](./puppeteer.browsercontext.md). | -| [close()](./puppeteer.browsercontext.close.md) | | Closes this [browser context](./puppeteer.browsercontext.md) and all associated [pages](./puppeteer.page.md). | -| [isIncognito()](./puppeteer.browsercontext.isincognito.md) | |

Whether this [browser context](./puppeteer.browsercontext.md) is incognito.

In Chrome, the [default browser context](./puppeteer.browser.defaultbrowsercontext.md) is the only non-incognito browser context.

| -| [newPage()](./puppeteer.browsercontext.newpage.md) | | Creates a new [page](./puppeteer.page.md) in this [browser context](./puppeteer.browsercontext.md). | -| [overridePermissions(origin, permissions)](./puppeteer.browsercontext.overridepermissions.md) | | Grants this [browser context](./puppeteer.browsercontext.md) the given permissions within the given origin. | -| [pages()](./puppeteer.browsercontext.pages.md) | | Gets a list of all open [pages](./puppeteer.page.md) inside this [browser context](./puppeteer.browsercontext.md). | -| [targets()](./puppeteer.browsercontext.targets.md) | | Gets all active [targets](./puppeteer.target.md) inside this [browser context](./puppeteer.browsercontext.md). | -| [waitForTarget(predicate, options)](./puppeteer.browsercontext.waitfortarget.md) | |

Waits until a [target](./puppeteer.target.md) matching the given predicate appears and returns it.

This will look all open [browser contexts](./puppeteer.browsercontext.md).

| diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontextevent.md b/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontextevent.md deleted file mode 100644 index 94dbed0cb43..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontextevent.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -sidebar_label: BrowserContextEvent ---- - -# BrowserContextEvent enum - -#### Signature: - -```typescript -export declare const enum BrowserContextEvent -``` - -## Enumeration Members - -| Member | Value | Description | -| --------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| TargetChanged | "targetchanged" | Emitted when the url of a target inside the browser context changes. Contains a [Target](./puppeteer.target.md) instance. | -| TargetCreated | "targetcreated" |

Emitted when a target is created within the browser context, for example when a new page is opened by [window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window/open) or by [browserContext.newPage](./puppeteer.browsercontext.newpage.md)

Contains a [Target](./puppeteer.target.md) instance.

| -| TargetDestroyed | "targetdestroyed" | Emitted when a target is destroyed within the browser context, for example when a page is closed. Contains a [Target](./puppeteer.target.md) instance. | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontextevents.md b/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontextevents.md deleted file mode 100644 index 4f2c6d8ce10..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontextevents.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_label: BrowserContextEvents ---- - -# BrowserContextEvents interface - -#### Signature: - -```typescript -export interface BrowserContextEvents extends Record -``` - -**Extends:** Record<[EventType](./puppeteer.eventtype.md), unknown> - -## Properties - -| Property | Modifiers | Type | Description | Default | -| --------------- | --------- | ------------------------------- | ----------- | ------- | -| targetchanged | | [Target](./puppeteer.target.md) | | | -| targetcreated | | [Target](./puppeteer.target.md) | | | -| targetdestroyed | | [Target](./puppeteer.target.md) | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontextoptions.md b/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontextoptions.md deleted file mode 100644 index 7bbd9bacf4a..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.browsercontextoptions.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -sidebar_label: BrowserContextOptions ---- - -# BrowserContextOptions interface - -#### Signature: - -```typescript -export interface BrowserContextOptions -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| --------------- | --------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------- | ------- | -| proxyBypassList | optional | string\[\] | Bypass the proxy for the given list of hosts. | | -| proxyServer | optional | string | Proxy server with optional port to use for all requests. Username and password can be set in Page.authenticate. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.browserevent.md b/website/versioned_docs/version-22.6.0/api/puppeteer.browserevent.md deleted file mode 100644 index 4472c3b53a9..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.browserevent.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_label: BrowserEvent ---- - -# BrowserEvent enum - -All the events a [browser instance](./puppeteer.browser.md) may emit. - -#### Signature: - -```typescript -export declare const enum BrowserEvent -``` - -## Enumeration Members - -| Member | Value | Description | -| --------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Disconnected | "disconnected" |

Emitted when Puppeteer gets disconnected from the browser instance. This might happen because either:

- The browser closes/crashes or - [Browser.disconnect()](./puppeteer.browser.disconnect.md) was called.

| -| TargetChanged | "targetchanged" | Emitted when the URL of a target changes. Contains a [Target](./puppeteer.target.md) instance. | -| TargetCreated | "targetcreated" |

Emitted when a target is created, for example when a new page is opened by [window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window/open) or by [browser.newPage](./puppeteer.browser.newpage.md)

Contains a [Target](./puppeteer.target.md) instance.

| -| TargetDestroyed | "targetdestroyed" | Emitted when a target is destroyed, for example when a page is closed. Contains a [Target](./puppeteer.target.md) instance. | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.browserevents.md b/website/versioned_docs/version-22.6.0/api/puppeteer.browserevents.md deleted file mode 100644 index 734340f78aa..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.browserevents.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_label: BrowserEvents ---- - -# BrowserEvents interface - -#### Signature: - -```typescript -export interface BrowserEvents extends Record -``` - -**Extends:** Record<[EventType](./puppeteer.eventtype.md), unknown> - -## Properties - -| Property | Modifiers | Type | Description | Default | -| --------------- | --------- | ------------------------------- | ----------- | ------- | -| disconnected | | undefined | | | -| targetchanged | | [Target](./puppeteer.target.md) | | | -| targetcreated | | [Target](./puppeteer.target.md) | | | -| targetdestroyed | | [Target](./puppeteer.target.md) | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.browserlaunchargumentoptions.md b/website/versioned_docs/version-22.6.0/api/puppeteer.browserlaunchargumentoptions.md deleted file mode 100644 index aca3119e2fc..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.browserlaunchargumentoptions.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: BrowserLaunchArgumentOptions ---- - -# BrowserLaunchArgumentOptions interface - -Launcher options that only apply to Chrome. - -#### Signature: - -```typescript -export interface BrowserLaunchArgumentOptions -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| ------------- | --------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -| args | optional | string\[\] | Additional command line arguments to pass to the browser instance. | | -| debuggingPort | optional | number | Specify the debugging port number to use | | -| devtools | optional | boolean | Whether to auto-open a DevTools panel for each tab. If this is set to true, then headless will be forced to false. | false | -| headless | optional | boolean \| 'shell' | Whether to run the browser in headless mode. | true | -| userDataDir | optional | string | Path to a user data directory. [see the Chromium docs](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md) for more info. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.cdpsessionevent.md b/website/versioned_docs/version-22.6.0/api/puppeteer.cdpsessionevent.md deleted file mode 100644 index ae877413fe6..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.cdpsessionevent.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -sidebar_label: CDPSessionEvent ---- - -# CDPSessionEvent namespace - -Events that the CDPSession class emits. - -#### Signature: - -```typescript -export declare namespace CDPSessionEvent -``` - -## Variables - -| Variable | Description | -| ----------------------------------------------------------------- | ----------- | -| [SessionAttached](./puppeteer.cdpsessionevent.sessionattached.md) | | -| [SessionDetached](./puppeteer.cdpsessionevent.sessiondetached.md) | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.cdpsessionevents.md b/website/versioned_docs/version-22.6.0/api/puppeteer.cdpsessionevents.md deleted file mode 100644 index 87ae0f53491..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.cdpsessionevents.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -sidebar_label: CDPSessionEvents ---- - -# CDPSessionEvents interface - -#### Signature: - -```typescript -export interface CDPSessionEvents extends CDPEvents, Record -``` - -**Extends:** [CDPEvents](./puppeteer.cdpevents.md), Record<[EventType](./puppeteer.eventtype.md), unknown> - -## Properties - -| Property | Modifiers | Type | Description | Default | -| --------------- | --------- | --------------------------------------- | ----------- | ------- | -| sessionattached | | [CDPSession](./puppeteer.cdpsession.md) | | | -| sessiondetached | | [CDPSession](./puppeteer.cdpsession.md) | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.clickoptions.md b/website/versioned_docs/version-22.6.0/api/puppeteer.clickoptions.md deleted file mode 100644 index 83299f55c44..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.clickoptions.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -sidebar_label: ClickOptions ---- - -# ClickOptions interface - -#### Signature: - -```typescript -export interface ClickOptions extends MouseClickOptions -``` - -**Extends:** [MouseClickOptions](./puppeteer.mouseclickoptions.md) - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------------------- | ------------------------------- | --------------------------------------------------------------------------------- | ------- | -| offset | optional | [Offset](./puppeteer.offset.md) | Offset for the clickable point relative to the top-left corner of the border box. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.commandoptions.md b/website/versioned_docs/version-22.6.0/api/puppeteer.commandoptions.md deleted file mode 100644 index 2149b4ba779..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.commandoptions.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -sidebar_label: CommandOptions ---- - -# CommandOptions interface - -#### Signature: - -```typescript -export interface CommandOptions -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------- | ------ | ----------- | ------- | -| timeout | | number | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.md b/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.md deleted file mode 100644 index 9ef669c2c31..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_label: CommonEventEmitter ---- - -# CommonEventEmitter interface - -#### Signature: - -```typescript -export interface CommonEventEmitter> -``` - -## Methods - -| Method | Description | -| --------------------------------------------------------------------------------- | ----------- | -| [emit(type, event)](./puppeteer.commoneventemitter.emit.md) | | -| [listenerCount(event)](./puppeteer.commoneventemitter.listenercount.md) | | -| [off(type, handler)](./puppeteer.commoneventemitter.off.md) | | -| [on(type, handler)](./puppeteer.commoneventemitter.on.md) | | -| [once(type, handler)](./puppeteer.commoneventemitter.once.md) | | -| [removeAllListeners(event)](./puppeteer.commoneventemitter.removealllisteners.md) | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.off.md b/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.off.md deleted file mode 100644 index 97fc89602de..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.off.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_label: CommonEventEmitter.off ---- - -# CommonEventEmitter.off() method - -#### Signature: - -```typescript -interface CommonEventEmitter { - off( - type: Key, - handler?: Handler - ): this; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------ | ------------ | -| type | Key | | -| handler | [Handler](./puppeteer.handler.md)<Events\[Key\]> | _(Optional)_ | - -**Returns:** - -this diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.on.md b/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.on.md deleted file mode 100644 index 5bb0fb6c8f5..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.on.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -sidebar_label: CommonEventEmitter.on ---- - -# CommonEventEmitter.on() method - -#### Signature: - -```typescript -interface CommonEventEmitter { - on(type: Key, handler: Handler): this; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------ | ----------- | -| type | Key | | -| handler | [Handler](./puppeteer.handler.md)<Events\[Key\]> | | - -**Returns:** - -this diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.once.md b/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.once.md deleted file mode 100644 index f7cae647043..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.commoneventemitter.once.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_label: CommonEventEmitter.once ---- - -# CommonEventEmitter.once() method - -#### Signature: - -```typescript -interface CommonEventEmitter { - once( - type: Key, - handler: Handler - ): this; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------ | ----------- | -| type | Key | | -| handler | [Handler](./puppeteer.handler.md)<Events\[Key\]> | | - -**Returns:** - -this diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.configuration.md b/website/versioned_docs/version-22.6.0/api/puppeteer.configuration.md deleted file mode 100644 index 217424319e7..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.configuration.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_label: Configuration ---- - -# Configuration interface - -Defines options to configure Puppeteer's behavior during installation and runtime. - -See individual properties for more information. - -#### Signature: - -```typescript -export interface Configuration -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| ------------------------------- | --------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| browserRevision | optional | string |

Specifies a certain version of the browser you'd like Puppeteer to use.

Can be overridden by PUPPETEER_BROWSER_REVISION.

See [puppeteer.launch](./puppeteer.puppeteernode.launch.md) on how executable path is inferred.

Use a specific browser version (e.g., 119.0.6045.105). If you use an alias such stable or canary it will only work during the installation of Puppeteer and it will fail when launching the browser.

| The pinned browser version supported by the current Puppeteer version. | -| cacheDirectory | optional | string |

Defines the directory to be used by Puppeteer for caching.

Can be overridden by PUPPETEER_CACHE_DIR.

| path.join(os.homedir(), '.cache', 'puppeteer') | -| defaultProduct | optional | [Product](./puppeteer.product.md) |

Specifies which browser you'd like Puppeteer to use.

Can be overridden by PUPPETEER_PRODUCT.

| chrome | -| downloadBaseUrl | optional | string |

Specifies the URL prefix that is used to download the browser.

Can be overridden by PUPPETEER_DOWNLOAD_BASE_URL.

| Either https://storage.googleapis.com/chrome-for-testing-public or https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central, depending on the product. | -| executablePath | optional | string |

Specifies an executable path to be used in [puppeteer.launch](./puppeteer.puppeteernode.launch.md).

Can be overridden by PUPPETEER_EXECUTABLE_PATH.

| **Auto-computed.** | -| experiments | optional | [ExperimentsConfiguration](./puppeteer.experimentsconfiguration.md) | Defines experimental options for Puppeteer. | | -| logLevel | optional | 'silent' \| 'error' \| 'warn' | Tells Puppeteer to log at the given level. | warn | -| skipChromeDownload | optional | boolean |

Tells Puppeteer to not Chrome download during installation.

Can be overridden by PUPPETEER_SKIP_CHROME_DOWNLOAD.

| | -| skipChromeHeadlessShellDownload | optional | boolean |

Tells Puppeteer to not chrome-headless-shell download during installation.

Can be overridden by PUPPETEER_SKIP_CHROME_HEADLESS_SHELL_DOWNLOAD.

| | -| skipDownload | optional | boolean |

Tells Puppeteer to not download during installation.

Can be overridden by PUPPETEER_SKIP_DOWNLOAD.

| | -| temporaryDirectory | optional | string |

Defines the directory to be used by Puppeteer for creating temporary files.

Can be overridden by PUPPETEER_TMP_DIR.

| os.tmpdir() | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.connect.md b/website/versioned_docs/version-22.6.0/api/puppeteer.connect.md deleted file mode 100644 index a3bbbcf4a3e..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.connect.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: connect ---- - -# connect() function - -#### Signature: - -```typescript -connect: ( - options: import('puppeteer-core/internal/puppeteer-core.js').ConnectOptions -) => Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------------------------------------------------------------------------------------- | ----------- | -| options | import("puppeteer-core/internal/puppeteer-core.js").[ConnectOptions](./puppeteer.connectoptions.md) | | - -**Returns:** - -Promise<import("puppeteer-core/internal/puppeteer-core.js").[Browser](./puppeteer.browser.md)> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.connection._constructor_.md b/website/versioned_docs/version-22.6.0/api/puppeteer.connection._constructor_.md deleted file mode 100644 index 914c3501578..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.connection._constructor_.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_label: Connection.(constructor) ---- - -# Connection.(constructor) - -Constructs a new instance of the `Connection` class - -#### Signature: - -```typescript -class Connection { - constructor( - url: string, - transport: ConnectionTransport, - delay?: number, - timeout?: number - ); -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------------------------------------------- | ------------ | -| url | string | | -| transport | [ConnectionTransport](./puppeteer.connectiontransport.md) | | -| delay | number | _(Optional)_ | -| timeout | number | _(Optional)_ | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.connection.md b/website/versioned_docs/version-22.6.0/api/puppeteer.connection.md deleted file mode 100644 index 3b7d0560412..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.connection.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -sidebar_label: Connection ---- - -# Connection class - -#### Signature: - -```typescript -export declare class Connection extends EventEmitter -``` - -**Extends:** [EventEmitter](./puppeteer.eventemitter.md)<[CDPSessionEvents](./puppeteer.cdpsessionevents.md)> - -## Constructors - -| Constructor | Modifiers | Description | -| ---------------------------------------------------------------------------------------- | --------- | -------------------------------------------------------------- | -| [(constructor)(url, transport, delay, timeout)](./puppeteer.connection._constructor_.md) | | Constructs a new instance of the Connection class | - -## Properties - -| Property | Modifiers | Type | Description | -| -------- | --------------------- | ------ | ----------- | -| timeout | readonly | number | | - -## Methods - -| Method | Modifiers | Description | -| -------------------------------------------------------------------- | ------------------- | ----------- | -| [createSession(targetInfo)](./puppeteer.connection.createsession.md) | | | -| [dispose()](./puppeteer.connection.dispose.md) | | | -| [fromSession(session)](./puppeteer.connection.fromsession.md) | static | | -| [send(method, params, options)](./puppeteer.connection.send.md) | | | -| [session(sessionId)](./puppeteer.connection.session.md) | | | -| [url()](./puppeteer.connection.url.md) | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.connectiontransport.md b/website/versioned_docs/version-22.6.0/api/puppeteer.connectiontransport.md deleted file mode 100644 index 39c56a17601..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.connectiontransport.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -sidebar_label: ConnectionTransport ---- - -# ConnectionTransport interface - -#### Signature: - -```typescript -export interface ConnectionTransport -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| --------- | --------------------- | ---------------------------- | ----------- | ------- | -| onclose | optional | () => void | | | -| onmessage | optional | (message: string) => void | | | - -## Methods - -| Method | Description | -| -------------------------------------------------------- | ----------- | -| [close()](./puppeteer.connectiontransport.close.md) | | -| [send(message)](./puppeteer.connectiontransport.send.md) | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.connectoptions.md b/website/versioned_docs/version-22.6.0/api/puppeteer.connectoptions.md deleted file mode 100644 index 588370ee469..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.connectoptions.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_label: ConnectOptions ---- - -# ConnectOptions interface - -#### Signature: - -```typescript -export interface ConnectOptions extends BrowserConnectOptions -``` - -**Extends:** [BrowserConnectOptions](./puppeteer.browserconnectoptions.md) - -## Properties - -| Property | Modifiers | Type | Description | Default | -| ----------------- | --------------------- | --------------------------------------------------------- | --------------------------------------------- | ------- | -| browserURL | optional | string | | | -| browserWSEndpoint | optional | string | | | -| headers | optional | Record<string, string> | Headers to use for the web socket connection. | | -| transport | optional | [ConnectionTransport](./puppeteer.connectiontransport.md) | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.consolemessage._constructor_.md b/website/versioned_docs/version-22.6.0/api/puppeteer.consolemessage._constructor_.md deleted file mode 100644 index 6e45d0788e4..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.consolemessage._constructor_.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_label: ConsoleMessage.(constructor) ---- - -# ConsoleMessage.(constructor) - -Constructs a new instance of the `ConsoleMessage` class - -#### Signature: - -```typescript -class ConsoleMessage { - constructor( - type: ConsoleMessageType, - text: string, - args: JSHandle[], - stackTraceLocations: ConsoleMessageLocation[] - ); -} -``` - -## Parameters - -| Parameter | Type | Description | -| ------------------- | ------------------------------------------------------------------- | ----------- | -| type | [ConsoleMessageType](./puppeteer.consolemessagetype.md) | | -| text | string | | -| args | [JSHandle](./puppeteer.jshandle.md)\[\] | | -| stackTraceLocations | [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md)\[\] | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.consolemessage.md b/website/versioned_docs/version-22.6.0/api/puppeteer.consolemessage.md deleted file mode 100644 index 812da548198..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.consolemessage.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_label: ConsoleMessage ---- - -# ConsoleMessage class - -ConsoleMessage objects are dispatched by page via the 'console' event. - -#### Signature: - -```typescript -export declare class ConsoleMessage -``` - -## Constructors - -| Constructor | Modifiers | Description | -| --------------------------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------ | -| [(constructor)(type, text, args, stackTraceLocations)](./puppeteer.consolemessage._constructor_.md) | | Constructs a new instance of the ConsoleMessage class | - -## Methods - -| Method | Modifiers | Description | -| -------------------------------------------------------- | --------- | ----------------------------------------------------------- | -| [args()](./puppeteer.consolemessage.args.md) | | An array of arguments passed to the console. | -| [location()](./puppeteer.consolemessage.location.md) | | The location of the console message. | -| [stackTrace()](./puppeteer.consolemessage.stacktrace.md) | | The array of locations on the stack of the console message. | -| [text()](./puppeteer.consolemessage.text.md) | | The text of the console message. | -| [type()](./puppeteer.consolemessage.type.md) | | The type of the console message. | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.consolemessagelocation.md b/website/versioned_docs/version-22.6.0/api/puppeteer.consolemessagelocation.md deleted file mode 100644 index 47aa190231d..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.consolemessagelocation.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -sidebar_label: ConsoleMessageLocation ---- - -# ConsoleMessageLocation interface - -#### Signature: - -```typescript -export interface ConsoleMessageLocation -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| ------------ | --------------------- | ------ | ----------------------------------------------------------------------------------- | ------- | -| columnNumber | optional | number | 0-based column number in the resource if known or undefined otherwise. | | -| lineNumber | optional | number | 0-based line number in the resource if known or undefined otherwise. | | -| url | optional | string | URL of the resource if known or undefined otherwise. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.continuerequestoverrides.md b/website/versioned_docs/version-22.6.0/api/puppeteer.continuerequestoverrides.md deleted file mode 100644 index 2dc955e943d..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.continuerequestoverrides.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -sidebar_label: ContinueRequestOverrides ---- - -# ContinueRequestOverrides interface - -#### Signature: - -```typescript -export interface ContinueRequestOverrides -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------------------- | ---------------------------- | ------------------------------------------------------------ | ------- | -| headers | optional | Record<string, string> | | | -| method | optional | string | | | -| postData | optional | string | | | -| url | optional | string | If set, the request URL will change. This is not a redirect. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.cookie.md b/website/versioned_docs/version-22.6.0/api/puppeteer.cookie.md deleted file mode 100644 index 87b68a21638..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.cookie.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -sidebar_label: Cookie ---- - -# Cookie interface - -Represents a cookie object. - -#### Signature: - -```typescript -export interface Cookie -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| ------------------ | --------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| domain | | string | Cookie domain. | | -| expires | | number | Cookie expiration date as the number of seconds since the UNIX epoch. Set to -1 for session cookies | | -| httpOnly | | boolean | True if cookie is http-only. | | -| name | | string | Cookie name. | | -| partitionKey | optional | string | Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. Supported only in Chrome. | | -| partitionKeyOpaque | optional | boolean | True if cookie partition key is opaque. Supported only in Chrome. | | -| path | | string | Cookie path. | | -| priority | optional | [CookiePriority](./puppeteer.cookiepriority.md) | Cookie Priority. Supported only in Chrome. | | -| sameParty | optional | boolean | True if cookie is SameParty. Supported only in Chrome. | | -| sameSite | optional | [CookieSameSite](./puppeteer.cookiesamesite.md) | Cookie SameSite type. | | -| secure | | boolean | True if cookie is secure. | | -| session | | boolean | True in case of session cookie. | | -| size | | number | Cookie size. | | -| sourceScheme | optional | [CookieSourceScheme](./puppeteer.cookiesourcescheme.md) | Cookie source scheme type. Supported only in Chrome. | | -| value | | string | Cookie value. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.cookieparam.md b/website/versioned_docs/version-22.6.0/api/puppeteer.cookieparam.md deleted file mode 100644 index 633f847c29e..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.cookieparam.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_label: CookieParam ---- - -# CookieParam interface - -Cookie parameter object - -#### Signature: - -```typescript -export interface CookieParam -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| ------------ | --------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| domain | optional | string | Cookie domain. | | -| expires | optional | number | Cookie expiration date, session cookie if not set | | -| httpOnly | optional | boolean | True if cookie is http-only. | | -| name | | string | Cookie name. | | -| partitionKey | optional | string | Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. If not set, the cookie will be set as not partitioned. | | -| path | optional | string | Cookie path. | | -| priority | optional | [CookiePriority](./puppeteer.cookiepriority.md) | Cookie Priority. Supported only in Chrome. | | -| sameParty | optional | boolean | True if cookie is SameParty. Supported only in Chrome. | | -| sameSite | optional | [CookieSameSite](./puppeteer.cookiesamesite.md) | Cookie SameSite type. | | -| secure | optional | boolean | True if cookie is secure. | | -| sourceScheme | optional | [CookieSourceScheme](./puppeteer.cookiesourcescheme.md) | Cookie source scheme type. Supported only in Chrome. | | -| url | optional | string | The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, and source scheme values of the created cookie. | | -| value | | string | Cookie value. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.coverage.md b/website/versioned_docs/version-22.6.0/api/puppeteer.coverage.md deleted file mode 100644 index 7dd807a8865..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.coverage.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -sidebar_label: Coverage ---- - -# Coverage class - -The Coverage class provides methods to gather information about parts of JavaScript and CSS that were used by the page. - -#### Signature: - -```typescript -export declare class Coverage -``` - -## Remarks - -To output coverage in a form consumable by [Istanbul](https://github.com/istanbuljs), see [puppeteer-to-istanbul](https://github.com/istanbuljs/puppeteer-to-istanbul). - -## Example - -An example of using JavaScript and CSS coverage to get percentage of initially executed code: - -```ts -// Enable both JavaScript and CSS coverage -await Promise.all([ - page.coverage.startJSCoverage(), - page.coverage.startCSSCoverage(), -]); -// Navigate to page -await page.goto('https://example.com'); -// Disable both JavaScript and CSS coverage -const [jsCoverage, cssCoverage] = await Promise.all([ - page.coverage.stopJSCoverage(), - page.coverage.stopCSSCoverage(), -]); -let totalBytes = 0; -let usedBytes = 0; -const coverage = [...jsCoverage, ...cssCoverage]; -for (const entry of coverage) { - totalBytes += entry.text.length; - for (const range of entry.ranges) usedBytes += range.end - range.start - 1; -} -console.log(`Bytes used: ${(usedBytes / totalBytes) * 100}%`); -``` - -## Constructors - -| Constructor | Modifiers | Description | -| -------------------------------------------------------------- | --------- | ------------------------------------------------------------ | -| [(constructor)(client)](./puppeteer.coverage._constructor_.md) | | Constructs a new instance of the Coverage class | - -## Methods - -| Method | Modifiers | Description | -| --------------------------------------------------------------------- | --------- | --------------------------------------------------------------------------- | -| [startCSSCoverage(options)](./puppeteer.coverage.startcsscoverage.md) | | | -| [startJSCoverage(options)](./puppeteer.coverage.startjscoverage.md) | | | -| [stopCSSCoverage()](./puppeteer.coverage.stopcsscoverage.md) | | Promise that resolves to the array of coverage reports for all stylesheets. | -| [stopJSCoverage()](./puppeteer.coverage.stopjscoverage.md) | | Promise that resolves to the array of coverage reports for all scripts. | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.coverage.startcsscoverage.md b/website/versioned_docs/version-22.6.0/api/puppeteer.coverage.startcsscoverage.md deleted file mode 100644 index ed93d8c7db9..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.coverage.startcsscoverage.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -sidebar_label: Coverage.startCSSCoverage ---- - -# Coverage.startCSSCoverage() method - -#### Signature: - -```typescript -class Coverage { - startCSSCoverage(options?: CSSCoverageOptions): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| options | [CSSCoverageOptions](./puppeteer.csscoverageoptions.md) | _(Optional)_ Set of configurable options for coverage, defaults to resetOnNavigation : true | - -**Returns:** - -Promise<void> - -Promise that resolves when coverage is started. diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.coverage.startjscoverage.md b/website/versioned_docs/version-22.6.0/api/puppeteer.coverage.startjscoverage.md deleted file mode 100644 index 7c8c75a7bec..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.coverage.startjscoverage.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_label: Coverage.startJSCoverage ---- - -# Coverage.startJSCoverage() method - -#### Signature: - -```typescript -class Coverage { - startJSCoverage(options?: JSCoverageOptions): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| options | [JSCoverageOptions](./puppeteer.jscoverageoptions.md) | _(Optional)_ Set of configurable options for coverage defaults to resetOnNavigation : true, reportAnonymousScripts : false, includeRawScriptCoverage : false, useBlockCoverage : true | - -**Returns:** - -Promise<void> - -Promise that resolves when coverage is started. - -## Remarks - -Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically created on the page using `eval` or `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous scripts URL will start with `debugger://VM` (unless a magic //\# sourceURL comment is present, in which case that will the be URL). diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.coverageentry.md b/website/versioned_docs/version-22.6.0/api/puppeteer.coverageentry.md deleted file mode 100644 index 325fee3d5b7..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.coverageentry.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_label: CoverageEntry ---- - -# CoverageEntry interface - -The CoverageEntry class represents one entry of the coverage report. - -#### Signature: - -```typescript -export interface CoverageEntry -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------- | ------------------------------------------------------ | --------------------------------------------- | ------- | -| ranges | | Array<{ start: number; end: number; }> | The covered range as start and end positions. | | -| text | | string | The content of the style sheet or script. | | -| url | | string | The URL of the style sheet or script. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.credentials.md b/website/versioned_docs/version-22.6.0/api/puppeteer.credentials.md deleted file mode 100644 index 36068a7b8cc..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.credentials.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -sidebar_label: Credentials ---- - -# Credentials interface - -#### Signature: - -```typescript -export interface Credentials -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------- | ------ | ----------- | ------- | -| password | | string | | | -| username | | string | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.csscoverage.md b/website/versioned_docs/version-22.6.0/api/puppeteer.csscoverage.md deleted file mode 100644 index a75a886a975..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.csscoverage.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -sidebar_label: CSSCoverage ---- - -# CSSCoverage class - -#### Signature: - -```typescript -export declare class CSSCoverage -``` - -## Constructors - -| Constructor | Modifiers | Description | -| ----------------------------------------------------------------- | --------- | --------------------------------------------------------------- | -| [(constructor)(client)](./puppeteer.csscoverage._constructor_.md) | | Constructs a new instance of the CSSCoverage class | - -## Methods - -| Method | Modifiers | Description | -| -------------------------------------------------- | --------- | ----------- | -| [start(options)](./puppeteer.csscoverage.start.md) | | | -| [stop()](./puppeteer.csscoverage.stop.md) | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.csscoverageoptions.md b/website/versioned_docs/version-22.6.0/api/puppeteer.csscoverageoptions.md deleted file mode 100644 index 59fc7dc152c..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.csscoverageoptions.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -sidebar_label: CSSCoverageOptions ---- - -# CSSCoverageOptions interface - -Set of configurable options for CSS coverage. - -#### Signature: - -```typescript -export interface CSSCoverageOptions -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| ----------------- | --------------------- | ------- | ---------------------------------------------- | ------- | -| resetOnNavigation | optional | boolean | Whether to reset coverage on every navigation. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.customqueryhandler.md b/website/versioned_docs/version-22.6.0/api/puppeteer.customqueryhandler.md deleted file mode 100644 index 83d6a1e13dd..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.customqueryhandler.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -sidebar_label: CustomQueryHandler ---- - -# CustomQueryHandler interface - -#### Signature: - -```typescript -export interface CustomQueryHandler -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| queryAll | optional | (node: Node, selector: string) => Iterable<Node> | Searches for some [Nodes](https://developer.mozilla.org/en-US/docs/Web/API/Node) matching the given selector from [node](https://developer.mozilla.org/en-US/docs/Web/API/Node). | | -| queryOne | optional | (node: Node, selector: string) => Node \| null | Searches for a [Node](https://developer.mozilla.org/en-US/docs/Web/API/Node) matching the given selector from [node](https://developer.mozilla.org/en-US/docs/Web/API/Node). | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.debuginfo.md b/website/versioned_docs/version-22.6.0/api/puppeteer.debuginfo.md deleted file mode 100644 index f20ed755451..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.debuginfo.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -sidebar_label: DebugInfo ---- - -# DebugInfo interface - -#### Signature: - -```typescript -export interface DebugInfo -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| --------------------- | --------- | --------- | ----------- | ------- | -| pendingProtocolErrors | | Error\[\] | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.defaultargs.md b/website/versioned_docs/version-22.6.0/api/puppeteer.defaultargs.md deleted file mode 100644 index 0db221a327e..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.defaultargs.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_label: defaultArgs ---- - -# defaultArgs() function - -#### Signature: - -```typescript -defaultArgs: (options?: import("puppeteer-core/internal/puppeteer-core.js").BrowserLaunchArgumentOptions | undefined) => string[] -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| options | import("puppeteer-core/internal/puppeteer-core.js").[BrowserLaunchArgumentOptions](./puppeteer.browserlaunchargumentoptions.md) \| undefined | _(Optional)_ | - -**Returns:** - -string\[\] diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.deletecookiesrequest.md b/website/versioned_docs/version-22.6.0/api/puppeteer.deletecookiesrequest.md deleted file mode 100644 index e74f197d436..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.deletecookiesrequest.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -sidebar_label: DeleteCookiesRequest ---- - -# DeleteCookiesRequest interface - -#### Signature: - -```typescript -export interface DeleteCookiesRequest -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| -------- | --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| domain | optional | string | If specified, deletes only cookies with the exact domain. | | -| name | | string | Name of the cookies to remove. | | -| path | optional | string | If specified, deletes only cookies with the exact path. | | -| url | optional | string | If specified, deletes all the cookies with the given name where domain and path match provided URL. Otherwise, deletes only cookies related to the current page's domain. | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.device.md b/website/versioned_docs/version-22.6.0/api/puppeteer.device.md deleted file mode 100644 index aae65de9957..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.device.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -sidebar_label: Device ---- - -# Device interface - -#### Signature: - -```typescript -export interface Device -``` - -## Properties - -| Property | Modifiers | Type | Description | Default | -| --------- | --------- | ----------------------------------- | ----------- | ------- | -| userAgent | | string | | | -| viewport | | [Viewport](./puppeteer.viewport.md) | | | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.devicerequestprompt.md b/website/versioned_docs/version-22.6.0/api/puppeteer.devicerequestprompt.md deleted file mode 100644 index ee9f1a62fc3..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.devicerequestprompt.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -sidebar_label: DeviceRequestPrompt ---- - -# DeviceRequestPrompt class - -Device request prompts let you respond to the page requesting for a device through an API like WebBluetooth. - -#### Signature: - -```typescript -export declare class DeviceRequestPrompt -``` - -## Remarks - -`DeviceRequestPrompt` instances are returned via the [Page.waitForDevicePrompt()](./puppeteer.page.waitfordeviceprompt.md) method. - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `DeviceRequestPrompt` class. - -## Example - -```ts -const [deviceRequest] = Promise.all([ - page.waitForDevicePrompt(), - page.click('#connect-bluetooth'), -]); -await devicePrompt.select( - await devicePrompt.waitForDevice(({name}) => name.includes('My Device')) -); -``` - -## Properties - -| Property | Modifiers | Type | Description | -| -------- | --------- | ------------------------------------------------------------------------- | ----------------------------------- | -| devices | | [DeviceRequestPromptDevice](./puppeteer.devicerequestpromptdevice.md)\[\] | Current list of selectable devices. | - -## Methods - -| Method | Modifiers | Description | -| ---------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------ | -| [cancel()](./puppeteer.devicerequestprompt.cancel.md) | | Cancel the prompt. | -| [select(device)](./puppeteer.devicerequestprompt.select.md) | | Select a device in the prompt's list. | -| [waitForDevice(filter, options)](./puppeteer.devicerequestprompt.waitfordevice.md) | | Resolve to the first device in the prompt matching a filter. | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.devicerequestprompt.waitfordevice.md b/website/versioned_docs/version-22.6.0/api/puppeteer.devicerequestprompt.waitfordevice.md deleted file mode 100644 index 6cd38101d43..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.devicerequestprompt.waitfordevice.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_label: DeviceRequestPrompt.waitForDevice ---- - -# DeviceRequestPrompt.waitForDevice() method - -Resolve to the first device in the prompt matching a filter. - -#### Signature: - -```typescript -class DeviceRequestPrompt { - waitForDevice( - filter: (device: DeviceRequestPromptDevice) => boolean, - options?: WaitTimeoutOptions - ): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------------------------------------------------------------------------------- | ------------ | -| filter | (device: [DeviceRequestPromptDevice](./puppeteer.devicerequestpromptdevice.md)) => boolean | | -| options | [WaitTimeoutOptions](./puppeteer.waittimeoutoptions.md) | _(Optional)_ | - -**Returns:** - -Promise<[DeviceRequestPromptDevice](./puppeteer.devicerequestpromptdevice.md)> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.dialog.accept.md b/website/versioned_docs/version-22.6.0/api/puppeteer.dialog.accept.md deleted file mode 100644 index fbf2f90e1a6..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.dialog.accept.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -sidebar_label: Dialog.accept ---- - -# Dialog.accept() method - -A promise that resolves when the dialog has been accepted. - -#### Signature: - -```typescript -class Dialog { - accept(promptText?: string): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| promptText | string | _(Optional)_ optional text that will be entered in the dialog prompt. Has no effect if the dialog's type is not prompt. | - -**Returns:** - -Promise<void> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.dialog.md b/website/versioned_docs/version-22.6.0/api/puppeteer.dialog.md deleted file mode 100644 index 26423c45f37..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.dialog.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -sidebar_label: Dialog ---- - -# Dialog class - -Dialog instances are dispatched by the [Page](./puppeteer.page.md) via the `dialog` event. - -#### Signature: - -```typescript -export declare abstract class Dialog -``` - -## Remarks - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Dialog` class. - -## Example - -```ts -import puppeteer from 'puppeteer'; - -(async () => { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - page.on('dialog', async dialog => { - console.log(dialog.message()); - await dialog.dismiss(); - await browser.close(); - }); - page.evaluate(() => alert('1')); -})(); -``` - -## Methods - -| Method | Modifiers | Description | -| ---------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------- | -| [accept(promptText)](./puppeteer.dialog.accept.md) | | A promise that resolves when the dialog has been accepted. | -| [defaultValue()](./puppeteer.dialog.defaultvalue.md) | | The default value of the prompt, or an empty string if the dialog is not a prompt. | -| [dismiss()](./puppeteer.dialog.dismiss.md) | | A promise which will resolve once the dialog has been dismissed | -| [message()](./puppeteer.dialog.message.md) | | The message displayed in the dialog. | -| [type()](./puppeteer.dialog.type.md) | | The type of the dialog. | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.drag.md b/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.drag.md deleted file mode 100644 index 801f4222d40..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.drag.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_label: ElementHandle.drag ---- - -# ElementHandle.drag() method - -Drags an element over the given element or point. - -#### Signature: - -```typescript -class ElementHandle { - drag( - this: ElementHandle, - target: Point | ElementHandle - ): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------------------------------------------------------------------------------- | ----------- | -| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | -| target | [Point](./puppeteer.point.md) \| [ElementHandle](./puppeteer.elementhandle.md)<Element> | | - -**Returns:** - -Promise<Protocol.Input.DragData \| void> - -DEPRECATED. When drag interception is enabled, the drag payload is returned. diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.draganddrop.md b/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.draganddrop.md deleted file mode 100644 index 5ea78045fa5..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.draganddrop.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -sidebar_label: ElementHandle.dragAndDrop ---- - -# ElementHandle.dragAndDrop() method - -> Warning: This API is now obsolete. -> -> Use `ElementHandle.drop` instead. - -#### Signature: - -```typescript -class ElementHandle { - dragAndDrop( - this: ElementHandle, - target: ElementHandle, - options?: { - delay: number; - } - ): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------ | ------------ | -| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | -| target | [ElementHandle](./puppeteer.elementhandle.md)<Node> | | -| options | { delay: number; } | _(Optional)_ | - -**Returns:** - -Promise<void> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.drop.md b/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.drop.md deleted file mode 100644 index a48303e108c..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.drop.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_label: ElementHandle.drop ---- - -# ElementHandle.drop() method - -Drops the given element onto the current one. - -#### Signature: - -```typescript -class ElementHandle { - drop( - this: ElementHandle, - element: ElementHandle - ): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------ | ----------- | -| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | -| element | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | - -**Returns:** - -Promise<void> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.drop_1.md b/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.drop_1.md deleted file mode 100644 index cae89f8de0f..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.drop_1.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_label: ElementHandle.drop_1 ---- - -# ElementHandle.drop() method - -> Warning: This API is now obsolete. -> -> No longer supported. - -#### Signature: - -```typescript -class ElementHandle { - drop( - this: ElementHandle, - data?: Protocol.Input.DragData - ): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------ | ------------ | -| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | -| data | Protocol.Input.DragData | _(Optional)_ | - -**Returns:** - -Promise<void> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.isintersectingviewport.md b/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.isintersectingviewport.md deleted file mode 100644 index 7ef5d21d924..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.isintersectingviewport.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_label: ElementHandle.isIntersectingViewport ---- - -# ElementHandle.isIntersectingViewport() method - -Resolves to true if the element is visible in the current viewport. If an element is an SVG, we check if the svg owner element is in the viewport instead. See https://crbug.com/963246. - -#### Signature: - -```typescript -class ElementHandle { - isIntersectingViewport( - this: ElementHandle, - options?: { - threshold?: number; - } - ): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | -| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | -| options | { threshold?: number; } | _(Optional)_ Threshold for the intersection between 0 (no intersection) and 1 (full intersection). Defaults to 1. | - -**Returns:** - -Promise<boolean> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.md b/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.md deleted file mode 100644 index 6691d089899..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -sidebar_label: ElementHandle ---- - -# ElementHandle class - -ElementHandle represents an in-page DOM element. - -#### Signature: - -```typescript -export declare abstract class ElementHandle extends JSHandle -``` - -**Extends:** [JSHandle](./puppeteer.jshandle.md)<ElementType> - -## Remarks - -ElementHandles can be created with the [Page.$()](./puppeteer.page._.md) method. - -```ts -import puppeteer from 'puppeteer'; - -(async () => { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - await page.goto('https://example.com'); - const hrefElement = await page.$('a'); - await hrefElement.click(); - // ... -})(); -``` - -ElementHandle prevents the DOM element from being garbage-collected unless the handle is [disposed](./puppeteer.jshandle.dispose.md). ElementHandles are auto-disposed when their origin frame gets navigated. - -ElementHandle instances can be used as arguments in [Page.$eval()](./puppeteer.page._eval.md) and [Page.evaluate()](./puppeteer.page.evaluate.md) methods. - -If you're using TypeScript, ElementHandle takes a generic argument that denotes the type of element the handle is holding within. For example, if you have a handle to a `` element matching `selector`, the method throws an error. - -#### Signature: - -```typescript -class ElementHandle { - select(...values: string[]): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| values | string\[\] | Values of options to select. If the <select> has the multiple attribute, all values are considered, otherwise only the first one is taken into account. | - -**Returns:** - -Promise<string\[\]> - -## Example - -```ts -handle.select('blue'); // single selection -handle.select('red', 'green', 'blue'); // multiple selections -``` diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.touchend.md b/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.touchend.md deleted file mode 100644 index 037605aa2b4..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.touchend.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: ElementHandle.touchEnd ---- - -# ElementHandle.touchEnd() method - -#### Signature: - -```typescript -class ElementHandle { - touchEnd(this: ElementHandle): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------ | ----------- | -| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | - -**Returns:** - -Promise<void> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.touchmove.md b/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.touchmove.md deleted file mode 100644 index f2221a7fc80..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.touchmove.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: ElementHandle.touchMove ---- - -# ElementHandle.touchMove() method - -#### Signature: - -```typescript -class ElementHandle { - touchMove(this: ElementHandle): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------ | ----------- | -| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | - -**Returns:** - -Promise<void> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.touchstart.md b/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.touchstart.md deleted file mode 100644 index 2fda4fe719e..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.elementhandle.touchstart.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_label: ElementHandle.touchStart ---- - -# ElementHandle.touchStart() method - -#### Signature: - -```typescript -class ElementHandle { - touchStart(this: ElementHandle): Promise; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------ | ----------- | -| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | - -**Returns:** - -Promise<void> diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.emit.md b/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.emit.md deleted file mode 100644 index 460b35034bf..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.emit.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_label: EventEmitter.emit ---- - -# EventEmitter.emit() method - -Emit an event and call any associated listeners. - -#### Signature: - -```typescript -class EventEmitter { - emit>( - type: Key, - event: EventsWithWildcard[Key] - ): boolean; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ---------------------------------------------------------------------------- | ---------------------------- | -| type | Key | the event you'd like to emit | -| event | [EventsWithWildcard](./puppeteer.eventswithwildcard.md)<Events>\[Key\] | | - -**Returns:** - -boolean - -`true` if there are any listeners, `false` if there are not. diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.listenercount.md b/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.listenercount.md deleted file mode 100644 index 279aa5810f9..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.listenercount.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_label: EventEmitter.listenerCount ---- - -# EventEmitter.listenerCount() method - -Gets the number of listeners for a given event. - -#### Signature: - -```typescript -class EventEmitter { - listenerCount(type: keyof EventsWithWildcard): number; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------------------------------------------------------------- | --------------------------------------- | -| type | keyof [EventsWithWildcard](./puppeteer.eventswithwildcard.md)<Events> | the event to get the listener count for | - -**Returns:** - -number - -the number of listeners bound to the given event diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.md b/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.md deleted file mode 100644 index 4ccdab9028d..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -sidebar_label: EventEmitter ---- - -# EventEmitter class - -The EventEmitter class that many Puppeteer classes extend. - -#### Signature: - -```typescript -export declare class EventEmitter> implements CommonEventEmitter> -``` - -**Implements:** [CommonEventEmitter](./puppeteer.commoneventemitter.md)<[EventsWithWildcard](./puppeteer.eventswithwildcard.md)<Events>> - -## Remarks - -This allows you to listen to events that Puppeteer classes fire and act accordingly. Therefore you'll mostly use [on](./puppeteer.eventemitter.on.md) and [off](./puppeteer.eventemitter.off.md) to bind and unbind to event listeners. - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `EventEmitter` class. - -## Methods - -| Method | Modifiers | Description | -| -------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------ | -| [emit(type, event)](./puppeteer.eventemitter.emit.md) | | Emit an event and call any associated listeners. | -| [listenerCount(type)](./puppeteer.eventemitter.listenercount.md) | | Gets the number of listeners for a given event. | -| [off(type, handler)](./puppeteer.eventemitter.off.md) | | Remove an event listener from firing. | -| [on(type, handler)](./puppeteer.eventemitter.on.md) | | Bind an event listener to fire when an event occurs. | -| [once(type, handler)](./puppeteer.eventemitter.once.md) | | Like on but the listener will only be fired once and then it will be removed. | -| [removeAllListeners(type)](./puppeteer.eventemitter.removealllisteners.md) | | Removes all listeners. If given an event argument, it will remove only listeners for that event. | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.off.md b/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.off.md deleted file mode 100644 index bc3772bdb72..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.off.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_label: EventEmitter.off ---- - -# EventEmitter.off() method - -Remove an event listener from firing. - -#### Signature: - -```typescript -class EventEmitter { - off>( - type: Key, - handler?: Handler[Key]> - ): this; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -| type | Key | the event type you'd like to stop listening to. | -| handler | [Handler](./puppeteer.handler.md)<[EventsWithWildcard](./puppeteer.eventswithwildcard.md)<Events>\[Key\]> | _(Optional)_ the function that should be removed. | - -**Returns:** - -this - -`this` to enable you to chain method calls. diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.on.md b/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.on.md deleted file mode 100644 index 66d4f13c419..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.on.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_label: EventEmitter.on ---- - -# EventEmitter.on() method - -Bind an event listener to fire when an event occurs. - -#### Signature: - -```typescript -class EventEmitter { - on>( - type: Key, - handler: Handler[Key]> - ): this; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | -| type | Key | the event type you'd like to listen to. Can be a string or symbol. | -| handler | [Handler](./puppeteer.handler.md)<[EventsWithWildcard](./puppeteer.eventswithwildcard.md)<Events>\[Key\]> | the function to be called when the event occurs. | - -**Returns:** - -this - -`this` to enable you to chain method calls. diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.once.md b/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.once.md deleted file mode 100644 index ade575276e1..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.once.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_label: EventEmitter.once ---- - -# EventEmitter.once() method - -Like `on` but the listener will only be fired once and then it will be removed. - -#### Signature: - -```typescript -class EventEmitter { - once>( - type: Key, - handler: Handler[Key]> - ): this; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -| type | Key | the event you'd like to listen to | -| handler | [Handler](./puppeteer.handler.md)<[EventsWithWildcard](./puppeteer.eventswithwildcard.md)<Events>\[Key\]> | the handler function to run when the event occurs | - -**Returns:** - -this - -`this` to enable you to chain method calls. diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.removealllisteners.md b/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.removealllisteners.md deleted file mode 100644 index 8b876d941ee..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.eventemitter.removealllisteners.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_label: EventEmitter.removeAllListeners ---- - -# EventEmitter.removeAllListeners() method - -Removes all listeners. If given an event argument, it will remove only listeners for that event. - -#### Signature: - -```typescript -class EventEmitter { - removeAllListeners(type?: keyof EventsWithWildcard): this; -} -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | --------------------------------------------------------------------------- | ----------------------------------------------- | -| type | keyof [EventsWithWildcard](./puppeteer.eventswithwildcard.md)<Events> | _(Optional)_ the event to remove listeners for. | - -**Returns:** - -this - -`this` to enable you to chain method calls. diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.executablepath.md b/website/versioned_docs/version-22.6.0/api/puppeteer.executablepath.md deleted file mode 100644 index 7f1882fa252..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.executablepath.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -sidebar_label: executablePath ---- - -# executablePath() function - -#### Signature: - -```typescript -executablePath: ( - channel?: - | import('puppeteer-core/internal/puppeteer-core.js').ChromeReleaseChannel - | undefined -) => string; -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------ | -| channel | import("puppeteer-core/internal/puppeteer-core.js").[ChromeReleaseChannel](./puppeteer.chromereleasechannel.md) \| undefined | _(Optional)_ | - -**Returns:** - -string diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.filechooser.md b/website/versioned_docs/version-22.6.0/api/puppeteer.filechooser.md deleted file mode 100644 index 9e9dfe718c8..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.filechooser.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -sidebar_label: FileChooser ---- - -# FileChooser class - -File choosers let you react to the page requesting for a file. - -#### Signature: - -```typescript -export declare class FileChooser -``` - -## Remarks - -`FileChooser` instances are returned via the [Page.waitForFileChooser()](./puppeteer.page.waitforfilechooser.md) method. - -In browsers, only one file chooser can be opened at a time. All file choosers must be accepted or canceled. Not doing so will prevent subsequent file choosers from appearing. - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `FileChooser` class. - -## Example - -```ts -const [fileChooser] = await Promise.all([ - page.waitForFileChooser(), - page.click('#upload-file-button'), // some button that triggers file selection -]); -await fileChooser.accept(['/tmp/myfile.pdf']); -``` - -## Methods - -| Method | Modifiers | Description | -| ----------------------------------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| [accept(paths)](./puppeteer.filechooser.accept.md) | | Accept the file chooser request with the given file paths. | -| [cancel()](./puppeteer.filechooser.cancel.md) | | Closes the file chooser without selecting any files. | -| [isMultiple()](./puppeteer.filechooser.ismultiple.md) | | Whether file chooser allow for [multiple](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-multiple) file selection. | diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.frame.__eval.md b/website/versioned_docs/version-22.6.0/api/puppeteer.frame.__eval.md deleted file mode 100644 index 456e3ca909a..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.frame.__eval.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -sidebar_label: Frame.$$eval ---- - -# Frame.$$eval() method - -Runs the given function on an array of elements matching the given selector in the frame. - -If the given function returns a promise, then this method will wait till the promise resolves. - -#### Signature: - -```typescript -class Frame { - $$eval< - Selector extends string, - Params extends unknown[], - Func extends EvaluateFuncWith< - Array>, - Params - > = EvaluateFuncWith>, Params>, - >( - selector: Selector, - pageFunction: string | Func, - ...args: Params - ): Promise>>; -} -``` - -## Parameters - -| Parameter | Type | Description | -| ------------ | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| selector | Selector | The selector to query for. | -| pageFunction | string \| Func | The function to be evaluated in the frame's context. An array of elements matching the given selector will be passed to the function as its first argument. | -| args | Params | Additional arguments to pass to pageFunction. | - -**Returns:** - -Promise<Awaited<ReturnType<Func>>> - -A promise to the result of the function. - -## Example - -```ts -const divsCounts = await frame.$$eval('div', divs => divs.length); -``` diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.frame._eval.md b/website/versioned_docs/version-22.6.0/api/puppeteer.frame._eval.md deleted file mode 100644 index 9a528518e08..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.frame._eval.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -sidebar_label: Frame.$eval ---- - -# Frame.$eval() method - -Runs the given function on the first element matching the given selector in the frame. - -If the given function returns a promise, then this method will wait till the promise resolves. - -#### Signature: - -```typescript -class Frame { - $eval< - Selector extends string, - Params extends unknown[], - Func extends EvaluateFuncWith, Params> = EvaluateFuncWith< - NodeFor, - Params - >, - >( - selector: Selector, - pageFunction: string | Func, - ...args: Params - ): Promise>>; -} -``` - -## Parameters - -| Parameter | Type | Description | -| ------------ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| selector | Selector | The selector to query for. | -| pageFunction | string \| Func | The function to be evaluated in the frame's context. The first element matching the selector will be passed to the function as its first argument. | -| args | Params | Additional arguments to pass to pageFunction. | - -**Returns:** - -Promise<Awaited<ReturnType<Func>>> - -A promise to the result of the function. - -## Example - -```ts -const searchValue = await frame.$eval('#search', el => el.value); -``` diff --git a/website/versioned_docs/version-22.6.0/api/puppeteer.frame.md b/website/versioned_docs/version-22.6.0/api/puppeteer.frame.md deleted file mode 100644 index 200c123ecb4..00000000000 --- a/website/versioned_docs/version-22.6.0/api/puppeteer.frame.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -sidebar_label: Frame ---- - -# Frame class - -Represents a DOM frame. - -To understand frames, you can think of frames as `