I use a xPath which uses contains and says it look like follow
//*[contains(text(),“hi”)][1]]
When i try to use
‘’
for the value hi its not finding the element instead when
“”
double quotes is given its finding the element.
The problem is when trying to use the value inside driver.findElementByXpath(locator) the double quotes is preceded by
/
like
//*[contains(text(),"/hi/")][1]]
.
Kindly help on how to construct a xPath like foloowing**//*[contains(text(),“hi”)][1]**