Full Page Screenshot Capture in Selenium for Websites with Scrolling

how to capture the screenshot full page for all different websites which have a scrolling functionality on their application user interface for your Selenium functional testing.

1 Like

Hey Ana,

To seamlessly capture full-page screenshots in your Selenium functional testing, integrate the following Webhook into your test cases at the specific points where screenshot capture is required for your application:

driver.executeScript("smartui.takeFullPageScreenshot=<Your Screenshot Name>")

This JavaScript snippet, executed by the Selenium WebDriver, triggers the ‘takeFullPageScreenshot’ function provided by the ‘smartui’ library, facilitating the capture of comprehensive screenshots even on websites with scrolling interfaces. Customize <Your Screenshot Name> to appropriately label and organize your captured screenshots for efficient analysis and debugging.

If you have any other queries feel free to reach out again.

Hi @LambdaTest, I have used the JavaScript, provided a unique name, and I cannot take a screenshot. Unfortunately, I do not receive any error, just the timeout exception: org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException. Do you know what could be the possible reason for this?

Hi There, Thank you for reaching out. Could you please provide the test ID or session ID so that we can check on our end?

Sure, the test ID is QNYPI-MDRUM-PLMRG-EORSC

Hi, We reviewed the test ID and found that the SmartUI screenshot command was not executed. Could you please provide the command where the full-page SmartUI screenshot is used?

Looking forward to hearing from you.