From 20e90e5b52caa0fe438acdfcfc6883653b984103 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 18 Dec 2024 09:10:12 -0800 Subject: [PATCH] feat: Enable snapshots for most remaining public commands --- .../playwright-core/src/protocol/debug.ts | 10 ++++++++++ packages/protocol/src/protocol.yml | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/packages/playwright-core/src/protocol/debug.ts b/packages/playwright-core/src/protocol/debug.ts index 4f44f5941e6be..8380e9f548c7b 100644 --- a/packages/playwright-core/src/protocol/debug.ts +++ b/packages/playwright-core/src/protocol/debug.ts @@ -89,13 +89,16 @@ export const commandsWithTracingSnapshots = new Set([ 'Page.mouseClick', 'Page.mouseWheel', 'Page.touchscreenTap', + 'Page.accessibilitySnapshot', 'Frame.evalOnSelector', 'Frame.evalOnSelectorAll', 'Frame.addScriptTag', 'Frame.addStyleTag', + 'Frame.ariaSnapshot', 'Frame.blur', 'Frame.check', 'Frame.click', + 'Frame.content', 'Frame.dragAndDrop', 'Frame.dblclick', 'Frame.dispatchEvent', @@ -116,6 +119,9 @@ export const commandsWithTracingSnapshots = new Set([ 'Frame.isVisible', 'Frame.isEditable', 'Frame.press', + 'Frame.querySelector', + 'Frame.querySelectorAll', + 'Frame.queryCount', 'Frame.selectOption', 'Frame.setContent', 'Frame.setInputFiles', @@ -133,8 +139,10 @@ export const commandsWithTracingSnapshots = new Set([ 'ElementHandle.evaluateExpressionHandle', 'ElementHandle.evalOnSelector', 'ElementHandle.evalOnSelectorAll', + 'ElementHandle.boundingBox', 'ElementHandle.check', 'ElementHandle.click', + 'ElementHandle.contentFrame', 'ElementHandle.dblclick', 'ElementHandle.dispatchEvent', 'ElementHandle.fill', @@ -150,6 +158,8 @@ export const commandsWithTracingSnapshots = new Set([ 'ElementHandle.isHidden', 'ElementHandle.isVisible', 'ElementHandle.press', + 'ElementHandle.querySelector', + 'ElementHandle.querySelectorAll', 'ElementHandle.screenshot', 'ElementHandle.scrollIntoViewIfNeeded', 'ElementHandle.selectOption', diff --git a/packages/protocol/src/protocol.yml b/packages/protocol/src/protocol.yml index 9997989f77cef..e8b9746b41cfe 100644 --- a/packages/protocol/src/protocol.yml +++ b/packages/protocol/src/protocol.yml @@ -1675,6 +1675,8 @@ Page: root: ElementHandle? returns: rootAXNode: AXNode? + flags: + snapshot: true pdf: parameters: @@ -1885,6 +1887,8 @@ Frame: timeout: number? returns: snapshot: string + flags: + snapshot: true blur: parameters: @@ -1943,6 +1947,8 @@ Frame: content: returns: value: string + flags: + snapshot: true dragAndDrop: parameters: @@ -2202,6 +2208,8 @@ Frame: strict: boolean? returns: element: ElementHandle? + flags: + snapshot: true querySelectorAll: parameters: @@ -2210,12 +2218,16 @@ Frame: elements: type: array items: ElementHandle + flags: + snapshot: true queryCount: parameters: selector: string returns: value: number + flags: + snapshot: true selectOption: parameters: @@ -2540,6 +2552,8 @@ ElementHandle: boundingBox: returns: value: Rect? + flags: + snapshot: true check: parameters: @@ -2585,6 +2599,8 @@ ElementHandle: contentFrame: returns: frame: Frame? + flags: + snapshot: true dblclick: parameters: @@ -2739,6 +2755,8 @@ ElementHandle: strict: boolean? returns: element: ElementHandle? + flags: + snapshot: true querySelectorAll: parameters: @@ -2747,6 +2765,8 @@ ElementHandle: elements: type: array items: ElementHandle + flags: + snapshot: true screenshot: parameters: