To get parent of Capybara's node do the following:
node = page.find '#selector'
parent = node.find(:xpath, '..')
parent_of_parent = node.find(:xpath, '../..')
Posted by konjoot to wiki (2013-12-19 16:01)
To get parent of Capybara's node do the following:
node = page.find '#selector'
parent = node.find(:xpath, '..')
parent_of_parent = node.find(:xpath, '../..')