I have next html code:
<ul class="nav">
<li class="active">
<a href="/users/page">Page</a>
</li>
...
</ul>
I want to make sure that i have li tag with class “active” and inside of that text.
So, i tried that:
response.should have_selector( "li", :class => "active" ,:content => "Page")
And it doesn’t work, i get such error:
Failure/Error: response.should have_selector( "li", :class => "active" ,:content => "Page")
expected following output to contain a <li class='active'>Page</li> tag:
How can i solve my problem?
I solved it: