Skip to content

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

chore: inspector snapshot nits (#5676)

Pavel Feldman2af8b8ac7471
diff --git a/src/server/supplements/injected/recorder.ts b/src/server/supplements/injected/recorder.ts
index 4f9d4a5003..8e5a8badd1 100644
--- a/src/server/supplements/injected/recorder.ts
+++ b/src/server/supplements/injected/recorder.ts
@@ -168,6 +168,7 @@ export class Recorder {
if (window.top === window) {
this._snapshotIframe = document.createElement('iframe');
this._snapshotIframe.src = this._snapshotBaseUrl;
+ this._snapshotIframe.style.background = '#ff000060';
this._snapshotIframe.style.position = 'fixed';
this._snapshotIframe.style.top = '0';
this._snapshotIframe.style.right = '0';
diff --git a/src/server/supplements/recorderSupplement.ts b/src/server/supplements/recorderSupplement.ts
index 6c32e64d10..6e358751cc 100644
--- a/src/server/supplements/recorderSupplement.ts
+++ b/src/server/supplements/recorderSupplement.ts
@@ -149,7 +149,7 @@ export class RecorderSupplement {
}
if (data.event === 'callLogHovered') {
this._hoveredSnapshot = undefined;
- if (this._isPaused())
+ if (this._isPaused() && data.params.callLogId)
this._hoveredSnapshot = data.params;
this._refreshOverlay();
return;
@@ -283,7 +283,7 @@ export class RecorderSupplement {
private _refreshOverlay() {
for (const page of this._context.pages())
- page.mainFrame()._evaluateExpression('window._playwrightRefreshOverlay', false, undefined, 'main').catch(() => {});
+ page.mainFrame()._evaluateExpression('window._playwrightRefreshOverlay()', false, undefined, 'main').catch(() => {});
}
private async _onPage(page: Page) {