class Capybara::Node::Document
A {Capybara::Document} represents an HTML document. Any operation performed on it will be performed on the entire document.
@see Capybara::Node
Public Instance Methods
Source
# File lib/capybara/node/document.rb, line 39 def evaluate_script(*args) find(:xpath, '/html').evaluate_script(*args) end
Source
# File lib/capybara/node/document.rb, line 35 def execute_script(*args) find(:xpath, '/html').execute_script(*args) end
Source
# File lib/capybara/node/document.rb, line 15 def inspect %(#<Capybara::Document>) end
Source
# File lib/capybara/node/document.rb, line 43 def scroll_to(*args, quirks: false, **options) find(:xpath, quirks ? '//body' : '/html').scroll_to(*args, **options) end
Source
# File lib/capybara/node/document.rb, line 23 def text(type = nil, normalize_ws: false) find(:xpath, '/html').text(type, normalize_ws: normalize_ws) end
@return [String] The text of the document
Source
# File lib/capybara/node/document.rb, line 31 def title session.driver.title end
@return [String] The title of the document