lib/capybara/node/finders.rb in capybara-3.19.1 vs lib/capybara/node/finders.rb in capybara-3.20.0

- old
+ new

@@ -29,10 +29,13 @@ # * 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 [Boolean] obscured Only find elements with the specified obscured state: + # * true - only find elements whose centerpoint is not in the viewport or is obscured by another non-descendant element. + # * false - only find elements whose centerpoint is in the viewport and is not obscured by other non-descendant elements. # @option options [String, Regexp] id Only find elements with an id that matches the value passed # @option options [String, Array<String>, Regexp] class Only find elements with matching class/classes. # + Absence of a class can be checked by prefixing the class name with ! # + If you need to check for existence of a class name that starts with ! then prefix with !! # + ```class:['a', '!b', '!!!c'] # limit to elements with class 'a' and '!c' but not class 'b'``` @@ -137,10 +140,10 @@ # @overload find_link([locator], **options) # @param [String] locator id, Capybara.test_id attribute, title, text, or alt of enclosed img element # # @macro waiting_behavior # - # @option options [String,Regexp,nil] href Value to match against the links href, if nil finds link placeholders (<a> elements with no href attribute) + # @option options [String,Regexp,nil] href Value to match against the links href, if nil finds link placeholders (<a> elements with no href attribute), if false ignores the href # @option options [String, Regexp] id Match links with the id provided # @option options [String] title Match links with the title provided # @option options [String] alt Match links with a contained img element whose alt matches # @option options [String, Array<String>, Regexp] class Match links that match the class(es) provided # @return [Capybara::Node::Element] The found element