How-to

Scroll into view (scrollIntoViewIfNeeded)

Scroll into view (scrollIntoViewIfNeeded) ​

Scrolls the page until the Target is in view, when it is not already visible.

Step model ​

action_namescrollIntoViewIfNeeded
GroupPointer
TargetRequired
ValueUnused
expected_valueUnused
TEST_ACCOUNTForbidden
Do not confuse withhover, focus

Target/Value facts match the source-of-truth catalog and Autotest step.

Prerequisites ​

  1. The Target locator is stable and the element is in the document.

Steps ​

  1. Add a scrollIntoViewIfNeeded step.
  2. Set Target.
  3. Leave Value empty.
  4. Save.

The step is stored on the autotest. Next - neighbouring steps or autotest run creation.

Examples ​

Heading at the bottom ​

Fields in the UI:

FieldValue
action_namescrollIntoViewIfNeeded
Targetkind ROLE, value heading, name Footer

Step JSON fragment (copy-paste):

json
{
  "action_name": "scrollIntoViewIfNeeded",
  "target": {
    "kind": "ROLE",
    "value": "heading",
    "name": "Footer"
  }
}

Common mistakes ​

  • The step does not replace a visibility assert. Add toBeVisible afterwards when you need the check.

Screenshots ​

Screenshots of the step form for scrollIntoViewIfNeeded will be added here in a later pass.

Version 1.0.0 · Last updated 2026-10-03

Did this page help?