1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
# frozen_string_literal: true
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
include Capybara::Node::DocumentMatchers
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
|