I need to use apostrophe (\') in my xpath expression which i need to use in finding elements using webdriver
i need to use below Xpath expression
//
I Encountered a similar situation where I need to write an xpath for an element shown below:
Element:
I was able to grep the element using below Xpath, where I used the backslash to escape the characters [ and ".
Xpath : //img[@data-ctl='\[\"DatePicker\"\]']
//img[@data-ctl='\[\"DatePicker\"\]']
Hope this helps.