Skip to content

Commit 63de58e

Browse files
Take full page screenshot on frontend failures (#3017)
Signed-off-by: Julien Tinguely <[email protected]>
1 parent f84ad09 commit 63de58e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/FrontendIntegrationTest.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,8 @@ trait FrontendTestCommon extends TestCommon with WebBrowser with CustomMatchers
442442
*/
443443
protected def screenshot()(implicit webDriver: WebDriverType): Unit = {
444444
clue("Saving screenshot") {
445-
val screenshotFile = webDriver.getScreenshotAs(OutputType.FILE)
445+
val fullScreen = webDriver.findElement(By.tagName("body"))
446+
val screenshotFile = fullScreen.getScreenshotAs(OutputType.FILE)
446447
val time = Calendar.getInstance.getTime
447448
val timestamp = new SimpleDateFormat("yy-MM-dd-H:m:s.S").format(time)
448449
val filename = Paths.get("log", s"screenshot-${timestamp}.png").toString

0 commit comments

Comments
 (0)