Skip to main content

Scroll actions

I scroll to the <top|bottom> of the page

Scrolls to the top or bottom of the current page.

Where

  • <top|bottom> is one of:

    • top to scroll to the top of the page
    • bottom to scroll to the bottom of the page

Example

  Given I navigate to "https://automationintesting.com/selenium/testpage"
And I scroll to the bottom of the page
I scroll to the <top|bottom> of <element>

Scrolls to the top or bottom of the given element.

Where

  • <top|bottom> is one of:

    • top to scroll to the top of the element
    • bottom to scroll to the bottom of the element
  • <element> the name of the element to scroll to

Example

  Given the surname field can be located by id "surname"
When I navigate to "https://automationintesting.com/selenium/testpage"
And I scroll to the top of the surname field