How to identify the element name in selenium
The element to match is as follows:
... some html....
<table>
some <tr's>
<tr><td>"caption in a <a> tag"</td><td> result value here </td></tr>
more <tr's>
.... more html
I'm using Selenium IDE but don't see a way 开发者_开发百科to match/capture the result value text anywhere ?
Given
<yyy name="iggy" caption="abcd" level="20"></yyy>
you would want to use
assertAttribute("iggy@caption", "abcd")
This uses the name as a locator and @caption to specify the attribute you want. You could follow it with
assertAttribute("iggy@level", "20")
to check the level attribute. You might use 'validateAttribute' instead of 'assertAttribute'. If you want to capture the attribute value use 'storeAttribute'.
精彩评论