Skip to content

Instantly share code, notes, and snippets.

@vladiim
Created June 18, 2012 09:21
Show Gist options
  • Select an option

  • Save vladiim/2947624 to your computer and use it in GitHub Desktop.

Select an option

Save vladiim/2947624 to your computer and use it in GitHub Desktop.
Capybara find order

:nth-child selector.

EG, a list of dates are in a <ul> with the id #dates:

page.should have_selector("ul#dates li:nth-child(1)", content: @date1.content) page.should have_selector("ul#dates li:nth-child(2)", content: @date2.content)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment