Skip to content

Commit 8525806

Browse files
committed
Add overloaded frame capturing method
1 parent bb9a95b commit 8525806

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: src/main/java/com/assertthat/selenium_shutterbug/core/Shutterbug.java

+15
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,21 @@ public static PageSnapshot shootFrame(WebDriver driver, WebElement frame,
301301
useDevicePixelRatio);
302302
}
303303

304+
/**
305+
* To be used when screenshotting the frame
306+
* and need to scroll while making screenshots, either vertically or
307+
* horizontally or both directions.
308+
*
309+
* @param driver WebDriver instance
310+
* @param capture Capture type
311+
* @return PageSnapshot instance
312+
*/
313+
public static PageSnapshot shootFrame(WebDriver driver, WebElement frame,
314+
Capture capture) {
315+
return shootFrame(driver, frame, capture, 0,
316+
true);
317+
}
318+
304319
/**
305320
* To be used when screenshotting the frame
306321
* and need to scroll while making screenshots, either vertically or

0 commit comments

Comments
 (0)