Skip to content

Instantly share code, notes, and snippets.

@mikecmpbll
Created August 2, 2015 18:16
Show Gist options
  • Select an option

  • Save mikecmpbll/d95c01ae4223e9202cd4 to your computer and use it in GitHub Desktop.

Select an option

Save mikecmpbll/d95c01ae4223e9202cd4 to your computer and use it in GitHub Desktop.
<tr class="foo"></tr>
<tr class="foo"></tr>
<tr></tr>
<tr class="bar"></tr>
# how'd i get to that 2nd foo row, from here?
# (logic being that it's the closest sibling node with class 'foo'
# before the bar tr
page.at_css(".bar")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment