class Capybara::RackTest::Node

def click_label

def click_label
  labelled_control = if native[:for]
    find_xpath("//input[@id='#{native[:for]}']")
  else
    find_xpath('.//input')
  end.first
  labelled_control.set(!labelled_control.checked?) if checkbox_or_radio?(labelled_control)
end