Forum Discussion

longchasen's avatar
longchasen
Contributor
4 years ago
Solved

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
    4 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.

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    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.