Gets the element in the active tab, satisfying the specified conditions
function JQueryGetElement(aSelector:string; aIndex:integer=-1):TCSElement;
//Select the first element div with id = sidebar var element:=JQueryGetElement('div#sidebar',0); //If the element is found, the if element.varName<>'' then //Emulate a click on it ClickElement(element);
//Select a random span element that is in a div element var element:=JQueryGetElement('div span',-1);
//Select the second img element that is after a span element var element:=JQueryGetElement('span + img',1);