https://stackoverflow.com/questions/39601090/escape-apostrophe-in-selenium
https://stackoverflow.com/questions/37542773/how-to-use-apostrophe-in-xpath-while-finding-element-using-webdriver
https://developers.perfectomobile.com/display/TT/Eclipse+-+Auto-Escape+Quotes+While+Pasting+Xpath
But none work, my objective is to pinpoint (to be able to do click later) an element that contains the text:
Senua's Saga: Hellblade2
The element looks like this in HTML
Code: Select all
<span class="01732d6d
ik7dh3pa d2edcug@ qv6é6swib
cletSuq] a8c37x1j s89635nw
ew@dbkib a5q79mjw gicxx5fr
ekzkrbhg oo9gr5id hzawbc8m
dir="auto">Senua's Saga:
Hellblade 2?</span>
invalid selector: Unable to locate an element with the xpath expression
This works, but because I trimmed the whole string
Code: Select all
MsgBox % oChrome.findElementByXpath("//*[contains(text(),'Hellblade 2')]").Attribute("outerHTML")
Code: Select all
MsgBox % oChrome.findElementByXpath("//*[contains(text(),'Senua's Saga: Hellblade 2')]").Attribute("outerHTML")
Code: Select all
MsgBox % oChrome.findElementByXpath("//*[contains(text(),\""Senua's Saga: Hellblade 2\"")]").Attribute("outerHTML")
Any suggestions? Thanks!