diff --git a/CLAUDE.md b/CLAUDE.md index d168ae9d1b9fc..858166243e0f6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -122,6 +122,7 @@ EOF )" ``` +Never add Co-Authored-By agents in commit message. Branch naming for issue fixes: `fix-` ## Development Guides diff --git a/docs/src/api/class-inspector.md b/docs/src/api/class-inspector.md deleted file mode 100644 index 67789d029bd33..0000000000000 --- a/docs/src/api/class-inspector.md +++ /dev/null @@ -1,83 +0,0 @@ -# class: Inspector -* since: v1.59 -* langs: js - -Interface to the Playwright inspector. - -## async method: Inspector.cancelPickLocator -* since: v1.59 - -Cancels an ongoing [`method: Inspector.pickLocator`] call by deactivating pick locator mode. -If no pick locator mode is active, this method is a no-op. - -## async method: Inspector.pickLocator -* since: v1.59 -- returns: <[Locator]> - -Enters pick locator mode where hovering over page elements highlights them and shows the corresponding locator. -Once the user clicks an element, the mode is deactivated and the [Locator] for the picked element is returned. - -**Usage** - -```js -const locator = await page.inspector().pickLocator(); -console.log(locator); -``` - -## event: Inspector.screencastFrame -* since: v1.59 -- argument: <[Object]> - - `data` <[Buffer]> JPEG-encoded frame data. - -Emitted for each captured JPEG screencast frame while the screencast is running. - -**Usage** - -```js -const inspector = page.inspector(); -inspector.on('screencastframe', ({ data, width, height }) => { - console.log(`frame ${width}x${height}, jpeg size: ${data.length}`); - require('fs').writeFileSync('frame.jpg', data); -}); -await inspector.startScreencast({ maxSize: { width: 1200, height: 800 } }); -// ... perform actions ... -await inspector.stopScreencast(); -``` - -## async method: Inspector.startScreencast -* since: v1.59 - -Starts capturing screencast frames. Frames are emitted as [`event: Inspector.screencastFrame`] events. - -**Usage** - -```js -const inspector = page.inspector(); -inspector.on('screencastframe', ({ data, width, height }) => { - console.log(`frame ${width}x${height}, size: ${data.length}`); -}); -await inspector.startScreencast({ maxSize: { width: 800, height: 600 } }); -// ... perform actions ... -await inspector.stopScreencast(); -``` - -### option: Inspector.startScreencast.maxSize -* since: v1.59 -- `maxSize` ?<[Object]> - - `width` <[int]> Max frame width in pixels. - - `height` <[int]> Max frame height in pixels. - -Maximum screencast frame dimensions. The output frame may be smaller to preserve the page aspect ratio. Defaults to 800×800. - -## async method: Inspector.stopScreencast -* since: v1.59 - -Stops the screencast started with [`method: Inspector.startScreencast`]. - -**Usage** - -```js -await inspector.startScreencast(); -// ... perform actions ... -await inspector.stopScreencast(); -``` diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index 1b3093a52ebc8..0300069b02d49 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -763,6 +763,13 @@ System prompt for the agent's loop. Brings page to front (activates tab). +## async method: Page.cancelPickLocator +* since: v1.59 +* langs: js + +Cancels an ongoing [`method: Page.pickLocator`] call by deactivating pick locator mode. +If no pick locator mode is active, this method is a no-op. + ## async method: Page.check * since: v1.8 * discouraged: Use locator-based [`method: Locator.check`] instead. Read more about [locators](../locators.md). @@ -2600,25 +2607,6 @@ Throws for non-input elements. However, if the element is inside the `