Scrolls the page to the specified element, emulates mouse cursor movement to specified coordinates relative to the element


function MoveToElement(aElement: TCSElement; aPointCount: integer = 0;
  aInterval: integer = 0; aX: integer = 0; aY: integer = 0;
  aScrollMethod: TCSScrollMethod = SM_WHEEL): boolean;


  • aElement
    • type: TCSElement
    • functions: element which has to be clicked
  • aPointCount
    • type: integer
    • functions: number of intermediate points during the motion
  • aInterval
    • type: integer
    • functions: delay (in ms) between the intermediate points
  • aX
    • type: integer
    • functions: X coordinate with respect to the upper left corner of the element
  • aY
    • type: integer
    • functions: Y coordinate with respect to the upper left corner of the element
  • aScrollMethod

Returned value

  • type: boolean
  • functions: flag indicating whether the movement is committed


  • Click will take place only on the element of the non-zero size
  • If aX and aY are zero, a random point of the rectangle containing the element will be selected
  • If aPointCount and aInterval are zero, they will be automatically calculated depending on the coordinates of the element


  1. LoadURI('');
    var Search:=GetElement('button',0,['name'],['btnG']);