2010-11-21 13:37:36 +00:00
|
|
|
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
|
2011-02-10 16:15:28 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
#
|
|
|
|
# @return [String] The text of the document
|
|
|
|
#
|
2013-02-17 14:28:28 +00:00
|
|
|
def text(type=nil)
|
|
|
|
find(:xpath, '/html').text(type)
|
2011-02-10 16:15:28 +00:00
|
|
|
end
|
2013-02-17 14:28:28 +00:00
|
|
|
|
2013-02-06 19:36:55 +00:00
|
|
|
def title
|
|
|
|
session.driver.title
|
|
|
|
end
|
2010-11-21 13:37:36 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|