Class: Capybara::Node::Document
- Includes:
- DocumentMatchers
- Defined in:
- lib/capybara/node/document.rb
Overview
A Document represents an HTML document. Any operation performed on it will be performed on the entire document.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #inspect ⇒ Object
-
#text(type = nil) ⇒ String
The text of the document.
- #title ⇒ Object
Methods included from DocumentMatchers
#assert_no_title, #assert_title, #has_no_title?, #has_title?
Methods inherited from Base
#find_css, #find_xpath, #initialize, #reload, #synchronize
Methods included from Matchers
#==, #assert_no_selector, #assert_no_text, #assert_selector, #assert_text, #has_button?, #has_checked_field?, #has_css?, #has_field?, #has_link?, #has_no_button?, #has_no_checked_field?, #has_no_css?, #has_no_field?, #has_no_link?, #has_no_select?, #has_no_selector?, #has_no_table?, #has_no_text?, #has_no_unchecked_field?, #has_no_xpath?, #has_select?, #has_selector?, #has_table?, #has_text?, #has_unchecked_field?, #has_xpath?
Methods included from Actions
#attach_file, #check, #choose, #click_button, #click_link, #click_link_or_button, #fill_in, #select, #uncheck, #unselect
Methods included from Finders
#all, #find, #find_button, #find_by_id, #find_field, #find_link, #first
Constructor Details
This class inherits a constructor from Capybara::Node::Base
Instance Method Details
#inspect ⇒ Object
14 15 16 |
# File 'lib/capybara/node/document.rb', line 14 def inspect %(#<Capybara::Document>) end |
#text(type = nil) ⇒ String
Returns The text of the document.
22 23 24 |
# File 'lib/capybara/node/document.rb', line 22 def text(type=nil) find(:xpath, '/html').text(type) end |
#title ⇒ Object
26 27 28 |
# File 'lib/capybara/node/document.rb', line 26 def title session.driver.title end |