xpath - check text is present in table (selenium IDE) -
i trying check text "autotest" present somewhere in html table "tabletest". in selenium ide, put code :
<tr> <td>verifytextpresent</td> <td>//table[@id='tabletest']</td> <td>autotest</td> </tr>
here code of html table :
<table id="mytable"> <tr> <td><a href="#">autotest</a></td> <td>test</td> </tr> <tr> <td><a href="#">uoi</a></td> <td>test</td> </tr> </table>
but assertion return false whereas text present in table. command can use check text present in table ?
i think reason you're trying verify 1 bit of text using entire table locator, rather specific section contains text you're looking for, result isn't matching because have other content within table, , verify step looking exact match. you'd need put in wildcards around autotest in selenium script, way make sure present somewhere within table.
script , log testing against html code provided table.
<tr> <td>verifytext</td> <td>css=table</td> <td>*autotest*</td> </tr> [info] playing test case untitled [info] executing: |verifytext | css=table | *autotest* | [info] test case passed
Comments
Post a Comment