Returns the first HTML element that matches an XPath query. Use the return value anywhere a control is used.
Note: Only use this statement if you are familiar with XPath and understand how changing QA Wizard Pro search options can impact scripts. See About XPath queries.
Syntax
GetControlFromXPathQuery("XPathQuery")
Arguments
| Argument | Description |
|---|---|
| XPathQuery | XPath query. |
Supported objects
Browser, Window
Return value
| Value | Description |
|---|---|
| Value | First HTML element that matches the XPath query. |
Example
myControl = Browser("WysiCorp").GetControlFromXPathQuery("html[1]/body[1]/table[2]/tbody[1]/tr[2]/td[4]/form[1]/table[1]")
myProperty = Window("WysiCorp").Control(myControl).Property("Inner Text")