Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: do not show highlight in lightweight recorder mode (#36868)

Pavel Feldman6e7cdd511e0f
diff --git a/packages/injected/src/recorder/recorder.ts b/packages/injected/src/recorder/recorder.ts
index b65c8e9ff2..4d62f68c7f 100644
--- a/packages/injected/src/recorder/recorder.ts
+++ b/packages/injected/src/recorder/recorder.ts
@@ -640,6 +640,15 @@ class JsonRecordActionTool implements RecorderTool {
this._recorder = recorder;
}
+ install() {
+ // No highlight for the lightweight recorder.
+ this._recorder.highlight.uninstall();
+ }
+
+ uninstall() {
+ this._recorder.highlight.install();
+ }
+
onClick(event: MouseEvent) {
// in webkit, sliding a range element may trigger a click event with a different target if the mouse is released outside the element bounding box.
// So we check the hovered element instead, and if it is a range input, we skip click handling