XPathDescription Class
The description of a Web test object based on the object’s XPath.

C# Syntax

public void verify_InnerText()
    // Open the Chrome browser.
    var browser = BrowserFactory.Launch(BrowserType.Chrome);

    // Use Try/Catch to add a warning to the run report if the assert validation fails.
        // Navigate to the New Tours website. 

        // Locate the link object using its XPath.
        var speakersCategoryLink = browser.Describe<ILink>(new XPathDescription("//DIV[@id=\"speakersImg\"]"));

        // Verify the innerText value.
        Assert.AreEqual("SPEAKERS Shop Now ", speakersCategoryLink.InnerText);
    catch (Exception e)
    // Use a ReportEvent step to add details to the results report if there is an error in the test.
        Reporter.ReportEvent("verify_innerTextIsPresented", "Failed during validation", Status.Failed, e);
Inheritance Hierarchy


Public Constructors
Public ConstructorXPathDescription ConstructorOverloaded. Initializes a new instance of the XPathDescription class.  
Public Methods
Public MethodCloneCreates an exact copy of the test object. (Inherited from HP.LFT.SDK.PropertiesDescription )
Public MethodToStringToString override. The string representation of this XPathDescription object.  
Public Operators
public Operator Implicit Type Conversion Implicit cast of the specified string to an XPathDescription.