Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable snapshots for most remaining public commands #34072

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/playwright-core/src/protocol/debug.ts
Original file line number Diff line number Diff line change
@@ -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',
20 changes: 20 additions & 0 deletions packages/protocol/src/protocol.yml
Original file line number Diff line number Diff line change
@@ -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: