Skip to content

Commit d61cc59

Browse files
author
Glib Briia
committed
Add overloaded shootPage with device pixel ratio and no timeout
1 parent d1991f0 commit d61cc59

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/java/com/assertthat/selenium_shutterbug/core/Shutterbug.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ public static PageSnapshot shootPage(WebDriver driver, ScrollStrategy scroll, in
7272
return shootPage(driver,scroll,scrollTimeout,false);
7373
}
7474

75+
/**
76+
* To be used when screen shooting the page
77+
* and need to scroll while making screen shots, either vertically or
78+
* horizontally or both directions (Chrome).
79+
*
80+
* @param driver WebDriver instance
81+
* @param scroll ScrollStrategy How you need to scroll
82+
* @param useDevicePixelRatio whether or not take into account device pixel ratio
83+
* @return PageSnapshot instance
84+
*/
85+
public static PageSnapshot shootPage(WebDriver driver, ScrollStrategy scroll, boolean useDevicePixelRatio) {
86+
return shootPage(driver,scroll,0,useDevicePixelRatio);
87+
}
88+
7589
/**
7690
* To be used when screen shooting the page
7791
* and need to scroll while making screen shots, either vertically or

0 commit comments

Comments
 (0)