Skip to main content

Full-Page Screenshots

Learn how to take full-page screenshots for your native apps using App Percy

Your app may require multiple scrolls to get to the end of a page. You can test these long pages using App Percy’s full-page screenshot feature.

You can take full-page screenshots by configuring these two parameters in your call to percyscreenshot function in your Appium Script.

Option Description
fullPage - Set to true if we want to take fullpage screenshots, default is false.
screenLengths - Set max screen lengths for fullPage, default is set to 4(Integer) screen lengths. This parameter is optional.

The screenLengths parameter accounts for how many device lengths your screenshot will be. For example, if you are testing on a device 2000 pixels high, and screenLengths is configured to 5, your screenshot will be 10,000 pixels high.

Please note that the maximum value for screenLengths is 10. If you pass a higher value, App Percy will reset it to 10 screen lengths.

This feature is in Beta. In case you face any challenges in creating full page screenshots for your native apps, contact us.

App Percy internally uses a scroll and stitch approach to taking screenshots. Therefore, when you call the percyScreenshot function within your test script, App Percy will scroll down to the appropriate length while taking screenshots and stitch them together. Please note that we do not store the starting position of the scroll and we do not scroll back to the starting position after the full page screenshot is taken.

Full page screenshots are supported only if you are using BrowserStack devices. You can try out full page screenshots using App Percy’s free plans.

Code Samples

If you are getting started, follow our tutorials to get started with App Percy.

You can use the sample code below to take full page screenshots using App Percy in your Appium test script.

Copy icon Copy snippet
Copy icon Copy snippet
Copy icon Copy snippet
Copy icon Copy snippet
Copy icon Copy snippet

Optional Arguments for Full-Page Screenshots:

Option Description
screenLengths - (Int) Set max screen lengths for fullPage, default is set to 4 screen lengths.
scrollableXpath - (String) Set xpath of scrollable element.
scrollableId - (String) accessibility id of scrollable element.

Supported Versions

  • For Android, your Appium server version should be greater than 1.19. All Android versions are supported.
  • For iOS, we support iOS versions 15 and newer.

Limitations

Our full page screenshot algorithm requires an element that we can track, which moves when we scroll. We determine the difference between that specific element’s position before and after scroll to determine how many pixels have we scrolled.

In case of a single large element in scroll view (for example, a ToS page in a single TextView) the child element of scroll view that we track becomes this TextView. In this case, even after scroll, the location of TextView remains the same. Appium only returns location and size of element in visible viewport, so we keep getting information that the element is at the top of the page. Therefore we are unable to detect that we have successfully scrolled, and cannot take full page screenshots for these pages.

For such cases we recommend splitting your content into multiple elements. If it is not possible to do that, then full page screenshot would not work for such pages. It will continue to work for other pages in your application. We are working on a solution to this limitation.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy