jack_edwards
9 years agoOccasional Contributor
Using FindChildByXPath with apostrophe in XPath
TC11 Documentation: https://support.smartbear.com/viewarticle/72332/ Hello, We have used FindChildByXPath successfully in the past, but are having an issue when the XPath contains an apostro...
- 9 years ago
Hi Jack,
If a value contains apostrophes, you need to wrap it in quotes instead of apostrophes:
Value = "A Midsummer Night's Dream" TempStr = "//*[@title=" & Chr(34) & Value & Chr(34) & "]"
' This is the same as TempStr = "//*[@title=""A Midsummer Night's Dream""]"