From 7b4458336b9cfa9167ad766f7c3a48c44b6d2b5d Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Tue, 21 Oct 2014 23:57:30 -0500 Subject: [PATCH] Document query visibility options --- lib/capybara/node/finders.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/capybara/node/finders.rb b/lib/capybara/node/finders.rb index 25676ec6..e8c2bd78 100644 --- a/lib/capybara/node/finders.rb +++ b/lib/capybara/node/finders.rb @@ -132,8 +132,12 @@ module Capybara # @param [:css, :xpath] kind The type of selector # @param [String] locator The selector # @option options [String, Regexp] text Only find elements which contain this text or match this regexp - # @option options [Boolean] visible Only find elements that are visible on the page. Setting this to false - # finds invisible _and_ visible elements. + # @option options [Boolean, String] visible Only find elements with the specified visibility: + # * true - only finds visible elements. + # * false - finds invisible _and_ visible elements. + # * :all - same as false; finds visible and invisible elements. + # * :hidden - only finds invisible elements. + # * :visible - same as true; only finds visible elements. # @option options [Integer] count Exact number of matches that are expected to be found # @option options [Integer] maximum Maximum number of matches that are expected to be found # @option options [Integer] minimum Minimum number of matches that are expected to be found