Class Capybara::Node::Simple
In: lib/capybara/node/simple.rb
Parent: Object

A {Capybara::Node::Simple} is a simpler version of {Capybara::Node::Base} which includes only {Capybara::Node::Finders} and {Capybara::Node::Matchers} and does not include {Capybara::Node::Actions}. This type of node is returned when using {Capybara.string}.

It is useful in that it does not require a session, an application or a driver, but can still use Capybara‘s finders and matchers on any string that contains HTML.

Methods

[]   checked?   find_in_base   new   path   selected?   tag_name   text   value   visible?   wait_until  

Included Modules

Capybara::Node::Finders Capybara::Node::Matchers

Attributes

native  [R] 

Public Class methods

Public Instance methods

Retrieve the given attribute

    element[:title] # => HTML title attribute

@param [Symbol] attribute The attribute to retrieve @return [String] The value of the attribute

Whether or not the element is checked.

@return [Boolean] Whether the element is checked

An XPath expression describing where on the page the element can be found

@return [String] An XPath expression

Whether or not the element is selected.

@return [Boolean] Whether the element is selected

@return [String] The tag name of the element

@return [String] The text of the element

@return [String] The value of the form element

Whether or not the element is visible. Does not support CSS, so the result may be inaccurate.

@return [Boolean] Whether the element is visible

Protected Instance methods

[Validate]