添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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]**