Forum Discussion

han's avatar
han
Contributor
13 years ago

xPath on text

Having problem using the text of the html element to grep on in an EvaluateXPath. I have tried the following (and they work in Chrome Developer Tools ): //*[text()='Text'] /...
  • HKosova's avatar
    13 years ago

    Hi Håkan,



    I've reproduced the issue and filed a bug report for the developers to look into. Thanks for bringing this to our attention.



    As a workaround, you can use the Page.FindChild, Page.FindAllChildren or Page.NativeWebObject.Find method for the search. For example, instead of the //*[text()='Text'] XPath search, you can use page.FindAllChildren("contentText", "*Text*", 100).



    However, if you need a patch for this, please open a support ticket and refer to this thread.