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
docs(locator): fix hideHighlight/highlight examples (#40602)
Pavel Feldman9748ce3c2513
diff --git a/docs/src/api/class-locator.md b/docs/src/api/class-locator.mdindex 4c1eb276df..40c0276261 100644--- a/docs/src/api/class-locator.md+++ b/docs/src/api/class-locator.md@@ -1474,7 +1474,7 @@ Attribute name to get the value for.## async method: Locator.hideHighlight* since: v1.60-Hide element highlight added with Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses [`method: Locator.highlight`].+Hides the element highlight previously added by [`method: Locator.highlight`].## async method: Locator.highlight* since: v1.20@@ -1485,13 +1485,13 @@ Highlight the corresponding element(s) on the screen. Useful for debugging, don'### option: Locator.highlight.style* since: v1.60* langs: js-- `style` <[string]|[Object]<[string], [any]>>+- `style` <[string]|[Object]<[string], [string]|[number]>>Inline CSS applied to the highlight overlay, e.g.```js-await locator.highlight('outline: 2px dashed red');-await locator.highlight({ color: 'red' });+await locator.highlight({ style: 'outline: 2px dashed red' });+await locator.highlight({ style: { color: 'red' } });```### option: Locator.highlight.stylediff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.tsindex ae1e5d711f..bda1eba162 100644--- a/packages/playwright-client/types/types.d.ts+++ b/packages/playwright-client/types/types.d.ts@@ -14220,8 +14220,7 @@ export interface Locator {}): Locator;/**- * Hide element highlight added with Highlight the corresponding element(s) on the screen. Useful for debugging, don't- * commit the code that uses+ * Hides the element highlight previously added by* [locator.highlight([options])](https://playwright.dev/docs/api/class-locator#locator-highlight).*/hideHighlight(): Promise<void>;diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex ae1e5d711f..bda1eba162 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -14220,8 +14220,7 @@ export interface Locator {}): Locator;/**- * Hide element highlight added with Highlight the corresponding element(s) on the screen. Useful for debugging, don't- * commit the code that uses+ * Hides the element highlight previously added by* [locator.highlight([options])](https://playwright.dev/docs/api/class-locator#locator-highlight).*/hideHighlight(): Promise<void>;