====== ScrollToElement ====== Scrolls the page to the specified element. ===== Syntax ===== function ScrollToElement(aElement: TCSElement; aScrollMethod: TCSScrollMethod = SM_WHEEL): boolean; ==== Parameters ==== * **//aElement//** * //type:// [[en:wascript:pascal:records:tcselement|TCSElement]] * //functions:// element up to which scrolling has to be made * **//aScrollMethod//** * //type:// [[en:wascript:pascal:enums:tcsscrollmethod|TCSScrollMethod]] * //functions:// scrolling method ==== Returned value ==== * //type:// boolean * //functions:// flag of the operation success ===== Examples ===== -//Obtain a random element with tag "img" var element:=GetElement('img'); //Emulating scroll to the element ScrollToElement(element);