xpath with multiple contains statements do not function correctly -
i have html code follows below. trying access selenium. if a
//*[contains(text(),'add officecontract (portal)')]
it finds several (there more html has more occurrences). want find specific instance when try
//*[contains(text(),'add officecontract (portal)') , contains(text(),'7121995')]
there no matches found. simpy doing
//*[contains(text(),'7121995')]
finds sorts of stuff (html full of string)
html code
<tr class="pd" valign="top"><br> <td> </td><br> <td nowrap="">sqaauto</td><br> <td nowrap="">01/30/2014 9:47:48 am</td><br> <td><br> <b>add officecontract (portal)</b><br> <br><br> office id 7121995<br> <br><br> contract id added: "8976504"<br> <br><br> term date added: "12/31/9999"<br> <br><br> </td><br> </tr>
i believe issue here 2 strings not found in same element (based on sample).
for above xpath return result need element this:
<b>add officecontract (portal) 7121995</b>
Comments
Post a Comment