ScrollToElement

Scrolls the page to the specified element.

Syntax

function ScrollToElement(aElement: TCSElement;
  aScrollMethod: TCSScrollMethod = SM_WHEEL): boolean;

Parameters

  • aElement
    • type: TCSElement
    • functions: element up to which scrolling has to be made
  • aScrollMethod

Returned value

  • type: boolean
  • functions: flag of the operation success

Examples

  1. //Obtain a random element with tag "img"
    var element:=GetElement('img');
    //Emulating scroll to the element
    ScrollToElement(element);