diff --git a/tests/library/inspector/inspectorTest.ts b/tests/library/inspector/inspectorTest.ts index 94ebd16dc2..d6577b1594 100644 --- a/tests/library/inspector/inspectorTest.ts +++ b/tests/library/inspector/inspectorTest.ts @@ -149,6 +149,8 @@ class Recorder { } async waitForHighlight(action: () => Promise): Promise { + await this.page.$$eval('x-pw-highlight', els => els.forEach(e => e.remove())); + await this.page.$$eval('x-pw-tooltip', els => els.forEach(e => e.remove())); await action(); await this.page.locator('x-pw-highlight').waitFor(); await this.page.locator('x-pw-tooltip').waitFor();