Gets the element in the active tab, satisfying the specified conditions


function JQueryGetElement(aSelector:string; aIndex:integer=-1):TCSElement;


Returned value

  • type: TCSElement
  • functions: structure that contains the parameters of the found element


  • If the index of the desired element aIndex is -1, it will be obtained a random element from the found
  • If none are found, then the resultant structure of the field will be empty.
  • Found element is highlighted by a dotted frame


  1. //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
  2. //Select a random span element that is in a div element
    var element:=JQueryGetElement('div span',-1);
  3. //Select the second img element that is after a span element
    var element:=JQueryGetElement('span + img',1);