Module: Capybara::RSpecMatchers

### Home Classes Methods

### In Files

- lib/capybara/rspec/matchers.rb

### Namespace

- CLASS Capybara::RSpecMatchers::BecomeClosed
- CLASS Capybara::RSpecMatchers::HaveSelector
- CLASS Capybara::RSpecMatchers::HaveText
- CLASS Capybara::RSpecMatchers::HaveTitle
- CLASS Capybara::RSpecMatchers::Matcher

### Methods

- #become_closed
- #have_button
- #have_checked_field
- #have_content
- #have_css
- #have_field
- #have_link
- #have_select
- #have_selector
- #have_table
- #have_text
- #have_title
- #have_unchecked_field
- #have_xpath

### Files

- another_test_file.txt
- test_file.txt

### Class/Module Index

Quicksearch

- Capybara
- Capybara::Ambiguous
- Capybara::CapybaraError
- Capybara::DSL
- Capybara::Driver
- Capybara::Driver::Base
- Capybara::Driver::Node
- Capybara::DriverNotFoundError
- Capybara::ElementNotFound
- Capybara::ExpectationNotMet
- Capybara::Features
- Capybara::FileNotFound
- Capybara::FrozenInTime
- Capybara::Helpers
- Capybara::InfiniteRedirectError
- Capybara::ModalNotFound
- Capybara::Node
- Capybara::Node::Actions
- Capybara::Node::Base
- Capybara::Node::Document
- Capybara::Node::DocumentMatchers
- Capybara::Node::Element
- Capybara::Node::Finders
- Capybara::Node::Matchers
- Capybara::Node::Simple
- Capybara::NotSupportedByDriverError
- Capybara::Queries
- Capybara::Queries::BaseQuery
- Capybara::Queries::TextQuery
- Capybara::Queries::TitleQuery
- Capybara::Query
- Capybara::RSpecMatchers
- Capybara::RSpecMatchers::BecomeClosed
- Capybara::RSpecMatchers::HaveSelector
- Capybara::RSpecMatchers::HaveText
- Capybara::RSpecMatchers::HaveTitle
- Capybara::RSpecMatchers::Matcher
- Capybara::RackTest
- Capybara::RackTest::Browser
- Capybara::RackTest::CSSHandlers
- Capybara::RackTest::Driver
- Capybara::RackTest::Form
- Capybara::RackTest::Form::NilUploadedFile
- Capybara::RackTest::Node
- Capybara::ReadOnlyElementError
- Capybara::Result
- Capybara::ScopeError
- Capybara::Selector
- Capybara::Selector::Filter
- Capybara::Selenium
- Capybara::Selenium::Driver
- Capybara::Selenium::Node
- Capybara::Server
- Capybara::Server::Middleware
- Capybara::Session
- Capybara::SpecHelper
- Capybara::UnselectNotAllowed
- Capybara::Window
- Capybara::WindowError
- TestApp
- TestApp::TestAppError
- Object

No matching classes.

# Capybara::RSpecMatchers

### Public Instance Methods

become_closed(options = {}) click to toggle source

Wait for window to become closed. @example

    expect(window).to become_closed(wait: 0.8)

@param options [Hash] optional param @option options [Numeric] :wait (Capybara.default_wait_time) wait time

    # File lib/capybara/rspec/matchers.rb, line 209
    def become_closed(options = {})
      BecomeClosed.new(options)
    end

have_button(locator, options={}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 179
    def have_button(locator, options={})
      HaveSelector.new(:button, locator, options)
    end

have_checked_field(locator, options={}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 187
    def have_checked_field(locator, options={})
      HaveSelector.new(:field, locator, options.merge(:checked => true))
    end

have_content(*args) click to toggle source
Alias for: have_text
have_css(css, options={}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 162
    def have_css(css, options={})
      HaveSelector.new(:css, css, options)
    end

have_field(locator, options={}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 183
    def have_field(locator, options={})
      HaveSelector.new(:field, locator, options)
    end

have_link(locator, options={}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 175
    def have_link(locator, options={})
      HaveSelector.new(:link, locator, options)
    end

have_select(locator, options={}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 195
    def have_select(locator, options={})
      HaveSelector.new(:select, locator, options)
    end

have_selector(*args) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 154
    def have_selector(*args)
      HaveSelector.new(*args)
    end

have_table(locator, options={}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 199
    def have_table(locator, options={})
      HaveSelector.new(:table, locator, options)
    end

have_text(*args) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 166
    def have_text(*args)
      HaveText.new(*args)
    end

Also aliased as: have_content
have_title(title, options = {}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 171
    def have_title(title, options = {})
      HaveTitle.new(title, options)
    end

have_unchecked_field(locator, options={}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 191
    def have_unchecked_field(locator, options={})
      HaveSelector.new(:field, locator, options.merge(:unchecked => true))
    end

have_xpath(xpath, options={}) click to toggle source

    # File lib/capybara/rspec/matchers.rb, line 158
    def have_xpath(xpath, options={})
      HaveSelector.new(:xpath, xpath, options)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.