class PageMagic::Element::Query::SingleResult
class SingleResult
- use to query when only one result should be expected
Public Instance Methods
find(capybara_element, &block)
click to toggle source
Find an element The supplied block will be used to decorate the results @param [Capybara::Node::Element] capybara_element the element to be searched within @return [Object] the results
# File lib/page_magic/element/query/single_result.rb, line 12 def find(capybara_element, &block) block.call capybara_element.find(*selector_args, **options) rescue Capybara::Ambiguous => e raise AmbiguousQueryException, e.message end