<span> 50 Line 1 shares $ 22.60 </span>
this is what i wrote and get fail
<tr>
<td>verifyText</td>
<td>css=#first > span</td>
<td>shares</td>
</tr>
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.
Sign up to join this community<span> 50 Line 1 shares $ 22.60 </span>
this is what i wrote and get fail
<tr>
<td>verifyText</td>
<td>css=#first > span</td>
<td>shares</td>
</tr>
Use "contains" like this:
assertElementPresent css=span:contains('shares')
Note that 'span' in unlikely to be unique however (there are almost certainly lots of them on the page). So you will need to look at the surrounding structure to see what tags will be better for isolating these elements. You could use span[which_one]
but it would be better to use other markup such as form#change_shares span:contains('shares')
(actual code will depend on stuff not shown by you) to specifically uniquely isolate the area of page you wish to target