check if capybara is defined