module Capybara::RSpecMatchers
def become_closed(**options)
(**options)
-
:wait
(Numeric
) -- Maximum wait time
Parameters:
-
options
(Hash
) -- optional param
def become_closed(**options) BecomeClosed.new(options) end
def have_all_of_selectors(*args, &optional_filter_block)
RSpec matcher for whether the element(s) matching a group of selectors exist
def have_all_of_selectors(*args, &optional_filter_block) HaveAllSelectors.new(*args, &optional_filter_block) end
def have_button(locator = nil, **options, &optional_filter_block)
RSpec matcher for buttons
def have_button(locator = nil, **options, &optional_filter_block) HaveSelector.new(:button, locator, options, &optional_filter_block) end
def have_checked_field(locator = nil, **options, &optional_filter_block)
RSpec matcher for checked fields
def have_checked_field(locator = nil, **options, &optional_filter_block) HaveSelector.new(:field, locator, options.merge(checked: true), &optional_filter_block) end
def have_css(css, **options, &optional_filter_block)
RSpec matcher for whether elements(s) matching a given css selector exist
def have_css(css, **options, &optional_filter_block) HaveSelector.new(:css, css, options, &optional_filter_block) end
def have_current_path(path, **options)
RSpec matcher for the current path
def have_current_path(path, **options) HaveCurrentPath.new(path, options) end
def have_field(locator = nil, **options, &optional_filter_block)
RSpec matcher for links
def have_field(locator = nil, **options, &optional_filter_block) HaveSelector.new(:field, locator, options, &optional_filter_block) end
def have_link(locator = nil, **options, &optional_filter_block)
RSpec matcher for links
def have_link(locator = nil, **options, &optional_filter_block) HaveSelector.new(:link, locator, options, &optional_filter_block) end
def have_none_of_selectors(*args, &optional_filter_block)
RSpec matcher for whether no element(s) matching a group of selectors exist
def have_none_of_selectors(*args, &optional_filter_block) HaveNoSelectors.new(*args, &optional_filter_block) end
def have_select(locator = nil, **options, &optional_filter_block)
RSpec matcher for select elements
def have_select(locator = nil, **options, &optional_filter_block) HaveSelector.new(:select, locator, options, &optional_filter_block) end
def have_selector(*args, &optional_filter_block)
RSpec matcher for whether the element(s) matching a given selector exist
def have_selector(*args, &optional_filter_block) HaveSelector.new(*args, &optional_filter_block) end
def have_table(locator = nil, **options, &optional_filter_block)
RSpec matcher for table elements
def have_table(locator = nil, **options, &optional_filter_block) HaveSelector.new(:table, locator, options, &optional_filter_block) end
def have_text(*args)
RSpec matcher for text content
def have_text(*args) HaveText.new(*args) end
def have_title(title, **options)
def have_title(title, **options) HaveTitle.new(title, options) end
def have_unchecked_field(locator = nil, **options, &optional_filter_block)
RSpec matcher for unchecked fields
def have_unchecked_field(locator = nil, **options, &optional_filter_block) HaveSelector.new(:field, locator, options.merge(unchecked: true), &optional_filter_block) end
def have_xpath(xpath, **options, &optional_filter_block)
RSpec matcher for whether elements(s) matching a given xpath selector exist
def have_xpath(xpath, **options, &optional_filter_block) HaveSelector.new(:xpath, xpath, options, &optional_filter_block) end
def match_css(css, **options, &optional_filter_block)
def match_css(css, **options, &optional_filter_block) MatchSelector.new(:css, css, options, &optional_filter_block) end
def match_selector(*args, &optional_filter_block)
RSpec matcher for whether the current element matches a given selector
def match_selector(*args, &optional_filter_block) MatchSelector.new(*args, &optional_filter_block) end
def match_xpath(xpath, **options, &optional_filter_block)
def match_xpath(xpath, **options, &optional_filter_block) MatchSelector.new(:xpath, xpath, options, &optional_filter_block) end