Admin Production rocket
Current Publication

GetElement Method

Reflection Desktop .NET API Guide V18.0
Rocket® Reflection Desktop (formerly a product of Micro Focus or formerly a product of Open Text) documentation that was created prior to Rocket Software's acquisition of certain products from OpenText may contain outdated references to "Micro Focus” or “OpenText”, which are trademarks of OpenText. Rocket Software is not affiliated with Micro Focus or OpenText and has rebranded these products as Rocket® products.
An XPath path pointing to a WebElement in the WebDocument.
GetElement Method (IWebDocument)
In This Topic
Gets the first Web element by an XPath path, relative to the current Web element.
Syntax

                     
                     
'Declaration
 

                     
                     
Function GetElement( _
   ByVal xPath As String _
) As IWebElement

                  

                     
                     
'Usage
 

                     
                     
Dim instance As IWebDocument
Dim xPath As String
Dim value As IWebElement
 
value = instance.GetElement(xPath)

                  

                     
                     
IWebElement GetElement( 
   string xPath
)

                  

Parameters

xPath
An XPath path pointing to a WebElement in the WebDocument.

Return Value

WebElement found, or null if no WebElement was found.
Remarks
XPath is a language that describes how to locate specific elements in XML documents by using an addressing syntax. This syntax is based on a path through the document's logical structure or hierarchy. A sample XPath syntax: HTML/BODY/TABLE/TBODY/TR[1]/TD[1], where WebElement index starts from 0.
See Also