Improved timeouts for selector screenshots

When the element to capture never appears, the screenshot now finishes within the request's timeout instead of failing with a timeout error.

Changelog1 min read

Written by

Dmytro Krasun

Published on

When you take a screenshot of an element by its selector, the API waits for that element to appear. With a timeout under 30 seconds, that wait took the whole request’s time. If the element never appeared, for example because the page changed, the request failed with a timeout error even though the page itself had loaded.

Now the wait ends a few seconds before the request times out, which leaves time to finish the render:

  • the API takes the screenshot of the page without the element, as it already did with longer timeouts;
  • or, if you asked for an error when the element isn’t found, it returns selector_not_found, which says what went wrong.

Screenshots where the element appears in time aren’t affected, and requests with longer timeouts still wait up to 30 seconds for the element.

Read more product updates

New features, bug fixes, and optimizations...

View all product updates
More reliable caching and downloads

More reliable caching and downloads

Improved cache failure handling, screenshot URLs, and partial downloads.

Read more

1 min read

More algorithms for screenshots by selectors

More algorithms for screenshots by selectors

We added more algorithms for screenshots by selectors.

Read more

1 min read

Improved favicon detection for metadata_icon

Improved favicon detection for metadata_icon

Improved `metadata_icon` to check common favicon link variants more reliably.

Read more

1 min read

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.