Skip to content

Commit 5e4ce94

Browse files
committed
[bidi] Fix failing tests due to change in argument for box screenshot
1 parent 4856589 commit 5e4ce94

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public String captureBoxScreenshot(double x, double y, double width, double heig
227227
id,
228228
"clip",
229229
Map.of(
230-
"type", "viewport",
230+
"type", "box",
231231
"x", x,
232232
"y", y,
233233
"width", width,

javascript/node/selenium-webdriver/bidi/browsingContext.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class BrowsingContext {
186186
params: {
187187
context: this._id,
188188
clip: {
189-
type: 'viewport',
189+
type: 'box',
190190
x: x,
191191
y: y,
192192
width: width,
@@ -195,7 +195,10 @@ class BrowsingContext {
195195
},
196196
}
197197

198+
console.log(JSON.stringify(params))
199+
198200
const response = await this.bidi.send(params)
201+
console.log(JSON.stringify(response))
199202
this.checkErrorInScreenshot(response)
200203
return response['result']['data']
201204
}

0 commit comments

Comments
 (0)