ZennoLab Assemblies Documentation
GetAttribute Method
See Also  Example Send Feedback
ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > HtmlElement Class : GetAttribute Method
attrName

Type: System.String

The name of attribute.

Glossary Item Box

Returns the text of attribute.

Syntax

C# 
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.
C#Copy Code
// 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");
PHPCopy Code
// 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: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2014 All Rights Reserved.