diff --git a/development/CLI_VERSION b/development/CLI_VERSION index 5a5c7211..9cbd34da 100644 --- a/development/CLI_VERSION +++ b/development/CLI_VERSION @@ -1 +1 @@ -1.50.0 +1.50.1 diff --git a/development/api.json b/development/api.json index c1e0e0e0..9ee104bc 100644 --- a/development/api.json +++ b/development/api.json @@ -28743,7 +28743,14 @@ "members": [ { "kind": "method", - "langs": {}, + "langs": { + "only": [ + "js" + ], + "aliases": {}, + "types": {}, + "overrides": {} + }, "since": "v1.8", "name": "connect", "type": { @@ -28753,11 +28760,21 @@ "spec": [ { "type": "text", - "text": "This method attaches Playwright to an existing browser instance. When connecting to another browser launched via `BrowserType.launchServer` in Node.js, the major and minor version needs to match the client version (1.2.3 → is compatible with 1.2.x)." + "text": "This method attaches Playwright to an existing browser instance created via [`method: BrowserType.launchServer`]." + }, + { + "type": "note", + "noteType": "note", + "children": [ + { + "type": "text", + "text": "The major and minor version of the Playwright instance that connects needs to match the version of Playwright that launches the browser (1.2.3 → is compatible with 1.2.x)." + } + ] } ], "required": true, - "comment": "This method attaches Playwright to an existing browser instance. When connecting to another browser launched via\n`BrowserType.launchServer` in Node.js, the major and minor version needs to match the client version (1.2.3 → is\ncompatible with 1.2.x).", + "comment": "This method attaches Playwright to an existing browser instance created via [`method: BrowserType.launchServer`].\n\n**NOTE** The major and minor version of the Playwright instance that connects needs to match the version of\nPlaywright that launches the browser (1.2.3 → is compatible with 1.2.x).\n", "async": true, "alias": "connect", "overloadIndex": 0, @@ -28774,11 +28791,11 @@ "spec": [ { "type": "text", - "text": "A browser websocket endpoint to connect to." + "text": "A Playwright browser websocket endpoint to connect to. You obtain this endpoint via [`method: BrowserServer.wsEndpoint`]." } ], "required": true, - "comment": "A browser websocket endpoint to connect to.", + "comment": "A Playwright browser websocket endpoint to connect to. You obtain this endpoint via\n[`method: BrowserServer.wsEndpoint`].", "async": false, "alias": "wsEndpoint", "overloadIndex": 0 @@ -28959,6 +28976,47 @@ } ] }, + { + "kind": "method", + "langs": { + "only": [ + "python", + "csharp", + "java" + ], + "aliases": {}, + "types": {}, + "overrides": {} + }, + "since": "v1.8", + "name": "connect", + "type": { + "name": "Browser", + "expression": "[Browser]" + }, + "spec": [ + { + "type": "text", + "text": "This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js." + }, + { + "type": "note", + "noteType": "note", + "children": [ + { + "type": "text", + "text": "The major and minor version of the Playwright instance that connects needs to match the version of Playwright that launches the browser (1.2.3 → is compatible with 1.2.x)." + } + ] + } + ], + "required": true, + "comment": "This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.\n\n**NOTE** The major and minor version of the Playwright instance that connects needs to match the version of\nPlaywright that launches the browser (1.2.3 → is compatible with 1.2.x).\n", + "async": true, + "alias": "connect", + "overloadIndex": 0, + "args": [] + }, { "kind": "method", "langs": {}, @@ -28987,6 +29045,16 @@ } ] }, + { + "type": "note", + "noteType": "note", + "children": [ + { + "type": "text", + "text": "This connection is significantly lower fidelity than the Playwright protocol connection via [`method: BrowserType.connect`]. If you are experiencing issues or attempting to use advanced functionality, you probably want to use [`method: BrowserType.connect`]." + } + ] + }, { "type": "text", "text": "**Usage**" @@ -29038,7 +29106,7 @@ } ], "required": true, - "comment": "This method attaches Playwright to an existing browser instance using the Chrome DevTools Protocol.\n\nThe default browser context is accessible via [`method: Browser.contexts`].\n\n**NOTE** Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.\n\n**Usage**\n\n```js\nconst browser = await playwright.chromium.connectOverCDP('http://localhost:9222');\nconst defaultContext = browser.contexts()[0];\nconst page = defaultContext.pages()[0];\n```\n\n```java\nBrowser browser = playwright.chromium().connectOverCDP(\"http://localhost:9222\");\nBrowserContext defaultContext = browser.contexts().get(0);\nPage page = defaultContext.pages().get(0);\n```\n\n```py\nbrowser = await playwright.chromium.connect_over_cdp(\"http://localhost:9222\")\ndefault_context = browser.contexts[0]\npage = default_context.pages[0]\n```\n\n```py\nbrowser = playwright.chromium.connect_over_cdp(\"http://localhost:9222\")\ndefault_context = browser.contexts[0]\npage = default_context.pages[0]\n```\n\n```csharp\nvar browser = await playwright.Chromium.ConnectOverCDPAsync(\"http://localhost:9222\");\nvar defaultContext = browser.Contexts[0];\nvar page = defaultContext.Pages[0];\n```\n", + "comment": "This method attaches Playwright to an existing browser instance using the Chrome DevTools Protocol.\n\nThe default browser context is accessible via [`method: Browser.contexts`].\n\n**NOTE** Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.\n\n**NOTE** This connection is significantly lower fidelity than the Playwright protocol connection via\n[`method: BrowserType.connect`]. If you are experiencing issues or attempting to use advanced functionality, you\nprobably want to use [`method: BrowserType.connect`].\n\n**Usage**\n\n```js\nconst browser = await playwright.chromium.connectOverCDP('http://localhost:9222');\nconst defaultContext = browser.contexts()[0];\nconst page = defaultContext.pages()[0];\n```\n\n```java\nBrowser browser = playwright.chromium().connectOverCDP(\"http://localhost:9222\");\nBrowserContext defaultContext = browser.contexts().get(0);\nPage page = defaultContext.pages().get(0);\n```\n\n```py\nbrowser = await playwright.chromium.connect_over_cdp(\"http://localhost:9222\")\ndefault_context = browser.contexts[0]\npage = default_context.pages[0]\n```\n\n```py\nbrowser = playwright.chromium.connect_over_cdp(\"http://localhost:9222\")\ndefault_context = browser.contexts[0]\npage = default_context.pages[0]\n```\n\n```csharp\nvar browser = await playwright.Chromium.ConnectOverCDPAsync(\"http://localhost:9222\");\nvar defaultContext = browser.Contexts[0];\nvar page = defaultContext.Pages[0];\n```\n", "async": true, "alias": "connectOverCDP", "overloadIndex": 0, @@ -63835,7 +63903,7 @@ "spec": [ { "type": "text", - "text": "Captures the aria snapshot of the given element.↵Read more about [aria snapshots](../aria-snapshots.md) and [`method: LocatorAssertions.toMatchAriaSnapshot#1`] for the corresponding assertion." + "text": "Captures the aria snapshot of the given element.↵Read more about [aria snapshots](../aria-snapshots.md) and [`method: LocatorAssertions.toMatchAriaSnapshot`] for the corresponding assertion." }, { "type": "text", @@ -63930,7 +63998,7 @@ } ], "required": true, - "comment": "Captures the aria snapshot of the given element. Read more about [aria snapshots](../aria-snapshots.md) and\n[`method: LocatorAssertions.toMatchAriaSnapshot#1`] for the corresponding assertion.\n\n**Usage**\n\n```js\nawait page.getByRole('link').ariaSnapshot();\n```\n\n```java\npage.getByRole(AriaRole.LINK).ariaSnapshot();\n```\n\n```py\nawait page.get_by_role(\"link\").aria_snapshot()\n```\n\n```py\npage.get_by_role(\"link\").aria_snapshot()\n```\n\n```csharp\nawait page.GetByRole(AriaRole.Link).AriaSnapshotAsync();\n```\n\n**Details**\n\nThis method captures the aria snapshot of the given element. The snapshot is a string that represents the state of\nthe element and its children. The snapshot can be used to assert the state of the element in the test, or to\ncompare it to state in the future.\n\nThe ARIA snapshot is represented using [YAML](https://yaml.org/spec/1.2.2/) markup language:\n- The keys of the objects are the roles and optional accessible names of the elements.\n- The values are either text content or an array of child elements.\n- Generic static text can be represented with the `text` key.\n\nBelow is the HTML markup and the respective ARIA snapshot:\n\n```html\n