Reputation: 7099
How to check how many <span class=error>error text</span>
is on page?
The code below is not working:
should have_selector('span.error', :count => 5)
Upvotes: 1
Views: 969
Reputation: 11198
From the docs:
all('a').each { |a| a[:href] }
So something like the following should be possible:
all('span.error').count.should == 5
Upvotes: 1