Focus Element Scroll To

Focus and scroll to an element before taking a screenshot. This option is only applicable when Full Page is set to false.

Focus Element Name

The name of the element to focus and scroll to, such as a link or button must be specified. The focus value can be by:

  • Text such as &focus=OK
  • Name such as &focus=mybutton
  • Id such as &focus=#mybotton
  • Class Name such as &focus=.gdpr-button

View element selection examples.

Focus and scroll to an element example

The example below shows how to find the text "Privacy", focus on it and scroll down to it before taking a screenshot.

// Line breaks added for readability https://api.addscreenshots.com/screenshots
?apikey=
YOUR_API_KEY
&focus=Privacy
&url=https://github.com

Take a screenshot of a focused area