Hi,
I am dependent on XPath for identifying the objects. And I write my own XPath instead of going through the OIC.
Here is an XPath to identify an object - //*[@id="uniqueNumber"]/parent::div/parent::div/parent::div/div[2]/div/mat-error/span
And I get the inner text of that object via the command.
browser.describe(WebElement.class, new XPathDescription(<xPath>)).getInnerText();
When I execute I get the error message
com.hp.lft.sdk.GeneralLeanFtException: Failed to execute 'evaluate' on 'Document': The string '//*[@id="uniqueNumber"]/uft:parent::div/uft:parent::div/uft:parent::div/uft:div[2]/uft:div/uft:mat-error/uft:span' is not a valid XPath expression.
If you see, UFT Developer is adding an additional 'uft:' to each level. I dont understand why it is doing it and how to avoid it.