Forum Discussion

longchasen's avatar
longchasen
Contributor
5 years ago

Apostrophe in XPath

Im using a "FindChildByXPath" where the expression have an apostrophe

 

object.FindChildByXPath("//div[text()='XY'Z']");

 

I tried the solution in previous forum - https://community.smartbear.com/t5/TestComplete-Functional-Web/Using-FindChildByXPath-with-apostrophe-in-XPath/td-p/116018

 

Unfortunately that doesnt work. 

  • sonya_m's avatar
    sonya_m
    5 years ago

    longchasen could you share your progress with us on this one? Have you tried what Marsha suggested?

     

    If none of the suggestions helped, I assume it is time to ask support directly. Please post your results when you have any! Thank you.

  • so you tried this?

     

    object.FindChildByXPath("//div[text()="XY'Z"]");

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      longchasen could you share your progress with us on this one? Have you tried what Marsha suggested?

       

      If none of the suggestions helped, I assume it is time to ask support directly. Please post your results when you have any! Thank you.