ZennoLab Assemblies Documentation
GetAttribute Method
Example 
ZennoLab.CommandCenter Namespace > HtmlElement Class : GetAttribute Method

Type: System.String

The name of attribute.

Returns the text of attribute.
Syntax
public string GetAttribute( 
   string attrName
)

Parameters

attrName

Type: System.String

The name of attribute.

Return Value

Type: System.String

The text of attribute.

Example
The following code example demonstrates uses of the GetAttribute method.
// find element by attribute
HtmlElement he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByAttribute("input:checkbox", "fulltag", "input:checkbox", "text", 0);
 
// get attribute value
string attributeText = he.GetAttribute("TagName");
// find element by attribute
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByAttribute("input:checkbox", "fulltag", "input:checkbox", "text", 0);
 
// get attribute value
$attributeText = $he->GetAttribute("TagName");
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

HtmlElement Class
HtmlElement Members
GetValue Method
SetAttribute Method
SetValue Method