Skip to content

Commit

Permalink
feat: Enable snapshots for most remaining public commands
Browse files Browse the repository at this point in the history
  • Loading branch information
agg23 committed Dec 18, 2024
1 parent aabbcbf commit 20e90e5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/playwright-core/src/protocol/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down
20 changes: 20 additions & 0 deletions packages/protocol/src/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,8 @@ Page:
root: ElementHandle?
returns:
rootAXNode: AXNode?
flags:
snapshot: true

pdf:
parameters:
Expand Down Expand Up @@ -1885,6 +1887,8 @@ Frame:
timeout: number?
returns:
snapshot: string
flags:
snapshot: true

blur:
parameters:
Expand Down Expand Up @@ -1943,6 +1947,8 @@ Frame:
content:
returns:
value: string
flags:
snapshot: true

dragAndDrop:
parameters:
Expand Down Expand Up @@ -2202,6 +2208,8 @@ Frame:
strict: boolean?
returns:
element: ElementHandle?
flags:
snapshot: true

querySelectorAll:
parameters:
Expand All @@ -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:
Expand Down Expand Up @@ -2540,6 +2552,8 @@ ElementHandle:
boundingBox:
returns:
value: Rect?
flags:
snapshot: true

check:
parameters:
Expand Down Expand Up @@ -2585,6 +2599,8 @@ ElementHandle:
contentFrame:
returns:
frame: Frame?
flags:
snapshot: true

dblclick:
parameters:
Expand Down Expand Up @@ -2739,6 +2755,8 @@ ElementHandle:
strict: boolean?
returns:
element: ElementHandle?
flags:
snapshot: true

querySelectorAll:
parameters:
Expand All @@ -2747,6 +2765,8 @@ ElementHandle:
elements:
type: array
items: ElementHandle
flags:
snapshot: true

screenshot:
parameters:
Expand Down

0 comments on commit 20e90e5

Please sign in to comment.