What Is Xpath For Itemcode="j" Air Filled Cylinders Dddfdf ''@#
Solution 1:
Your usecase is quite tricky.
Depending on which scraping language you use, maybe(I'm not able to test in the moment) use something like this (example JavaScript):
let xpath = '//td[text()=concat(\'"J" AIR FILLED CYLINDERS DDDFDF \',"\'\'\'\'@#") ]';
This wil construct this XPath:
//td[text()=concat('"J" AIR FILLED CYLINDERS DDDFDF ',"''''@#") ]
Meaning: in the case that there is a combi of single or double quotes in your ItemCode you have to build a XPath using the XPath-concat() function.
See these answers answer and this answer and this question.
Solution 2:
See if this works
driver.find_element_by_xpath(".//td[@class='edit-cell ui-state-highlight']").text
Solution 3:
If I understand what you are trying to do, is to locate element according to it's text. If so, please try this:
String locator = "//td[contains(text(),'%s')]";
locator = String.format(locator,"'J' AIR FILLED CYLINDERS DDDFDF ''@#");
driver.findElement(By.xpath(locator));
here you can pass any relevant value inside the format()
to format a specific XPath locator
Post a Comment for "What Is Xpath For Itemcode="j" Air Filled Cylinders Dddfdf ''@#"