Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: align select options docs (#27097)
Pavel Feldmanc6510ac00080
diff --git a/docs/src/api/class-elementhandle.md b/docs/src/api/class-elementhandle.mdindex 7f2641999a..62a61e808e 100644--- a/docs/src/api/class-elementhandle.md+++ b/docs/src/api/class-elementhandle.md@@ -777,7 +777,7 @@ Triggers a `change` and `input` event once all the provided options have been se**Usage**```js-// single selection matching the value+// Single selection matching the value or labelhandle.selectOption('blue');// single selection matching the label@@ -788,7 +788,7 @@ handle.selectOption(['red', 'green', 'blue']);``````java-// single selection matching the value+// Single selection matching the value or labelhandle.selectOption("blue");// single selection matching the labelhandle.selectOption(new SelectOption().setLabel("Blue"));@@ -797,7 +797,7 @@ handle.selectOption(new String[] {"red", "green", "blue"});``````python async-# single selection matching the value+# Single selection matching the value or labelawait handle.select_option("blue")# single selection matching the labelawait handle.select_option(label="blue")@@ -806,7 +806,7 @@ await handle.select_option(value=["red", "green", "blue"])``````python sync-# single selection matching the value+# Single selection matching the value or labelhandle.select_option("blue")# single selection matching both the labelhandle.select_option(label="blue")@@ -815,7 +815,7 @@ handle.select_option(value=["red", "green", "blue"])``````csharp-// single selection matching the value+// Single selection matching the value or labelawait handle.SelectOptionAsync(new[] { "blue" });// single selection matching the labelawait handle.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.mdindex 8b2e6b7bf1..5ea3d8e6e0 100644--- a/docs/src/api/class-frame.md+++ b/docs/src/api/class-frame.md@@ -1486,7 +1486,7 @@ Triggers a `change` and `input` event once all the provided options have been se**Usage**```js-// single selection matching the value+// Single selection matching the value or labelframe.selectOption('select#colors', 'blue');// single selection matching both the value and the label@@ -1497,7 +1497,7 @@ frame.selectOption('select#colors', 'red', 'green', 'blue');``````java-// single selection matching the value+// Single selection matching the value or labelframe.selectOption("select#colors", "blue");// single selection matching both the value and the labelframe.selectOption("select#colors", new SelectOption().setLabel("Blue"));@@ -1506,7 +1506,7 @@ frame.selectOption("select#colors", new String[] {"red", "green", "blue"});``````python async-# single selection matching the value+# Single selection matching the value or labelawait frame.select_option("select#colors", "blue")# single selection matching the labelawait frame.select_option("select#colors", label="blue")@@ -1515,7 +1515,7 @@ await frame.select_option("select#colors", value=["red", "green", "blue"])``````python sync-# single selection matching the value+# Single selection matching the value or labelframe.select_option("select#colors", "blue")# single selection matching both the labelframe.select_option("select#colors", label="blue")@@ -1524,7 +1524,7 @@ frame.select_option("select#colors", value=["red", "green", "blue"])``````csharp-// single selection matching the value+// Single selection matching the value or labelawait frame.SelectOptionAsync("select#colors", new[] { "blue" });// single selection matching both the value and the labelawait frame.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.mdindex 1d66376562..21f7a70bad 100644--- a/docs/src/api/class-page.md+++ b/docs/src/api/class-page.md@@ -3406,7 +3406,7 @@ Triggers a `change` and `input` event once all the provided options have been se**Usage**```js-// single selection matching the value+// Single selection matching the value or labelpage.selectOption('select#colors', 'blue');// single selection matching the label@@ -3418,7 +3418,7 @@ page.selectOption('select#colors', ['red', 'green', 'blue']);``````java-// single selection matching the value+// Single selection matching the value or labelpage.selectOption("select#colors", "blue");// single selection matching both the value and the labelpage.selectOption("select#colors", new SelectOption().setLabel("Blue"));@@ -3427,7 +3427,7 @@ page.selectOption("select#colors", new String[] {"red", "green", "blue"});``````python async-# single selection matching the value+# Single selection matching the value or labelawait page.select_option("select#colors", "blue")# single selection matching the labelawait page.select_option("select#colors", label="blue")@@ -3436,7 +3436,7 @@ await page.select_option("select#colors", value=["red", "green", "blue"])``````python sync-# single selection matching the value+# Single selection matching the value or labelpage.select_option("select#colors", "blue")# single selection matching both the labelpage.select_option("select#colors", label="blue")@@ -3445,7 +3445,7 @@ page.select_option("select#colors", value=["red", "green", "blue"])``````csharp-// single selection matching the value+// Single selection matching the value or labelawait page.SelectOptionAsync("select#colors", new[] { "blue" });// single selection matching both the value and the labelawait page.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });diff --git a/docs/src/input.md b/docs/src/input.mdindex 20efdefb14..ec1e6e6239 100644--- a/docs/src/input.md+++ b/docs/src/input.md@@ -144,7 +144,7 @@ Selects one or multiple options in the `<select>` element with [`method: LocatorYou can specify option `value`, or `label` to select. Multiple options can be selected.```js-// Single selection matching the value+// Single selection matching the value or labelawait page.getByLabel('Choose a color').selectOption('blue');// Single selection matching the label@@ -155,7 +155,7 @@ await page.getByLabel('Choose multiple colors').selectOption(['red', 'green', 'b``````java-// Single selection matching the value+// Single selection matching the value or labelpage.getByLabel("Choose a color").selectOption("blue");// Single selection matching the label@@ -166,7 +166,7 @@ page.getByLabel("Choose multiple colors").selectOption(new String[] {"red", "gre``````python async-# Single selection matching the value+# Single selection matching the value or labelawait page.get_by_label('Choose a color').select_option('blue')# Single selection matching the label@@ -177,7 +177,7 @@ await page.get_by_label('Choose multiple colors').select_option(['red', 'green',``````python sync-# Single selection matching the value+# Single selection matching the value or labelpage.get_by_label('Choose a color').select_option('blue')# Single selection matching the label@@ -188,7 +188,7 @@ page.get_by_label('Choose multiple colors').select_option(['red', 'green', 'blue``````csharp-// Single selection matching the value+// Single selection matching the value or labelawait page.GetByLabel("Choose a color").SelectOptionAsync("blue");// Single selection matching the labeldiff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex 3e89c6ef1c..51fb492427 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -3676,7 +3676,7 @@ export interface Page {* **Usage**** ```js- * // single selection matching the value+ * // Single selection matching the value or label* page.selectOption('select#colors', 'blue');** // single selection matching the label@@ -6772,7 +6772,7 @@ export interface Frame {* **Usage**** ```js- * // single selection matching the value+ * // Single selection matching the value or label* frame.selectOption('select#colors', 'blue');** // single selection matching both the value and the label@@ -9988,7 +9988,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* **Usage**** ```js- * // single selection matching the value+ * // Single selection matching the value or label* handle.selectOption('blue');** // single selection matching the label