====== MoveToElement ====== Scrolls the page to the specified element, emulates mouse cursor movement to specified coordinates relative to the element ===== Syntax ===== function MoveToElement(aElement: TCSElement; aPointCount: integer = 0; aInterval: integer = 0; aX: integer = 0; aY: integer = 0; aScrollMethod: TCSScrollMethod = SM_WHEEL): boolean; ==== Parameters ==== * **//aElement//** * //type:// [[en:wascript:pascal:records:tcselement|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//** * //type:// [[en:wascript:pascal:enums:tcsscrollmethod|TCSScrollMethod]] * //functions:// scrolling method ==== Returned value ==== * //type:// boolean * //functions:// flag indicating whether the movement is committed ===== Notes ===== * 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 ===== Examples ===== -LoadURI('google.ru'); TypeIn('test'); var Search:=GetElement('button',0,['name'],['btnG']); MoveToElement(Search,0,0,0,0,SM_SCROLLBAR);