Share this page

GetAttribute Method
Returns the value of a single attribute.

C# Syntax

    string GetAttribute(
       string attributeName
    )

Parameters

attributeName
  The attribute name for the value to retrieve.

Return Value

The value of the specified attribute (null if the attribute does not exist).
Example

    IImage tipImg = browser.Describe<IImage>(new ImageDescription
    {
        Alt = As.RegExp(@"Tip.*"),
        Type = HP.LFT.SDK.Web.ImageType.Normal,
        TagName = @"IMG"
    });
    string alt = tipImg.GetAttribute("alt");

Tips to improve your search results... OpenText™ Functional Testing for Developers .NET SDK Version: 25.2 OpenText™ Functional Testing for Developers SDK 25.2 All View Local Help Center View Online Help Center Version: