Method: Capybara.string
- Defined in:
- lib/capybara.rb
.string(html) ⇒ Capybara::Node::Simple
Wraps the given string, which should contain an HTML document or fragment in a Capybara::Node::Simple which exposes all Capybara::Node::Matchers, Capybara::Node::Finders and Capybara::Node::DocumentMatchers. This allows you to query any string containing HTML in the exact same way you would query the current document in a Capybara session.
240 241 242 |
# File 'lib/capybara.rb', line 240 def string(html) Capybara::Node::Simple.new(html) end |