Issue
<td role="gridcell" style="" title="'J' AIR FILLED CYLINDERS DDDFDF ''@#" aria-describedby="item_grid_ItemCode" class="edit-cell ui-state-highlight">"J" AIR FILLED CYLINDERS DDDFDF ''@#</td>
ItemCode="J" AIR FILLED CYLINDERS DDDFDF ''@#
tried below xpath which didn't worked
1. //td[text()=\""+ItemCode+"\"]
2. //td[text()=\'"+ItemCode+"\']
Solution
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.
Answered By - Siebe Jongebloed
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.