Stop scrolling screenshots when a given selector is visible

New options were added to the ScreenshotOne API to stop scrolling screenshots when a given selector is reached.

Written by

Dmytro Krasun

Published on

ScreenshotOne has a scrolling screenshot feature. It allows you to record videos of a page being scrolled. There is a variety of options to tune it and make it work for your case.

But one of the ScreenshotOne customers requested a new option—to stop scrolling screenshots when a given selector is visible.

For example, you want to record a video of a page being scrolled till the “pricing section” is visible and stop there for some reason. Or like in the example below, you want to record a video of a page being scrolled till the “code example” section:

Two new options have been added to the ScreenshotOne API to achieve that:

  1. scroll_till_selector—scroll till the selector is visible;
  2. And scroll_till_selector_adjust_top—adjust the top position of the selector in the viewport.

The resulting code for the example above will be:

https://api.screenshotone.com/animate?access_key=<YOUR API KEY>
&url=https://screenshotone.com/scrolling-screenshots/
&scenario=scroll
&scroll_till_selector=body%20%3E%20div:nth-child(8)

If you have any feedback or suggestions, please let us know at support@screenshotone.com.

Read more product updates

Interviews, tips, guides, industry best practices, and news.

View all posts

Improving performance and stability by consolidating validation and access check logic in the API gateway

For the past few days, I have been working on improving the stability and performance of the ScreenshotOne API. I started from low-hanging fruits—moving validations and access key management from rendering services to ScreenshotOne's API gateway. The API will be more stable and performant as a result. If you are curious why, please continue reading.

Read more

Improved the behavior and stability of the "scroll_into_view" option

Before the change, there was a subset of cases when the rendering requests were failing when using the scroll_into_view option. Now, it is improved and will make rendering more stable.

Read more

Fail rendering if the content contains a string

There is a set of use cases when you want to fail screenshot rendering and retry it if the content of the page contains a string.

Read more

Automate website screenshots

Exhaustive documentation, ready SDKs, no-code tools, and other automation to help you render website screenshots and outsource all the boring work related to that to us.