Sha256: 50f5c3cbd85ee9e64a87d7d9faf2d36e8a0993513587dd808293d53db07e8b34

Contents?: true

Size: 534 Bytes

Versions: 8

Compression:

Stored size: 534 Bytes

Contents

module Capybara
  module Node

    ##
    #
    # A {Capybara::Document} represents an HTML document. Any operation
    # performed on it will be performed on the entire document.
    #
    # @see Capybara::Node
    #
    class Document < Base
      def inspect
        %(#<Capybara::Document>)
      end

      ##
      #
      # @return [String]    The text of the document
      #
      def text(type=nil)
        find(:xpath, '/html').text(type)
      end

      def title
        session.driver.title
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
capybara-2.3.0 lib/capybara/node/document.rb
capybara-2.2.1 lib/capybara/node/document.rb
capybara-2.2.0 lib/capybara/node/document.rb
capybara-2.2.0.rc1 lib/capybara/node/document.rb
swipe-rails-0.0.5 vendor/bundle/gems/capybara-2.1.0/lib/capybara/node/document.rb
capybara-2.1.0 lib/capybara/node/document.rb
capybara-2.1.0.rc1 lib/capybara/node/document.rb
capybara-2.1.0.beta1 lib/capybara/node/document.rb