Reputation: 2406
In my website, I have a form who add a new 'td' element in a table. The content of td elements contains a random identifier
After submit, I have an html structure like that :
<table>
<tr>
<td class="a">edazdad</td>
<td class="b">dscsdcsdc</td>
...
<td class="n">rkjrlejf</td>
</tr>
</table>
So, I want add an assert test in selenium IDE. I want check if my new element is in my table html element.
I try :
AssertText
or
AssertText
How can I do that ? =)
Upvotes: 0
Views: 2621
Reputation: 669
First of all something is really wrong with your Selenium IDE since assertText is acting like assertAlert. Are you sure that you are using correct command? Because the second example in you question seems totally Ok.
Secondly if because of some strange and weird problem assertText is really not working here is the workaround:
click | //table/tr/td[contains(text(), 'dscsdcsdc')]
It will fail if there is no element with 'dscsdcsdc' because you are already verifying that element has the text by locating element containing the text.
BUT Once again
assertText | //table/tr/td[contains(text(), 'dscsdcsdc')]/text() | dscsdcsdc
should work. Check the command please
Good luck.
Upvotes: 1