GetElementAttribute

Gets the value of the specified attribute of the specified element

Syntax

function GetElementAttribute(aElement: TCSElement; aAttribute: string): string;

Parameters

  • aElement
  • aAttribute
    • type: string
    • functions: attribute value of which must be obtained

Returned value

  • type: string
  • functions: attribute value

Notes

Examples

  1. //Loading page google.ru
    LoadURI('google.ru');
    //Get the element (request input field)
    var element:=GetElement('input',0,['class','id'],['gbqfif','gbqfq'],true);
    //Get the value of the attribute "name" of element
    var name:=GetElementAttribute(element,'name');