I got this error in RSpec. Are there any docs for have_selector
that explain each key in the options hash and what exactly it does?
invalid keys :content, should be one of :text, :visible, :between, :count, :maximum, :minimum, :exact, :match, :wait
capybara provides this method to rspec. capybara's docs don't make it easy to find the answer to your question, so let's follow the source:
have_selector
is in Capybara::RSpecMatchers
. It delegates to the nested class HaveSelector
, which delegates to the method assert_selector
.
assert_selector
is in Capybara::Node::Matchers
. (So is a method has_selector?
, although that's not what rspec calls.) assert_selector
's rdoc documents the :count
option. It also says "It also accepts all options that Finders#all accepts, such as :text and :visible." Clicking through to Finders#all
finally gets us to the documentation of all the options:
Options Hash (options):
is
expressions in the given XPath match exactly or partiallyIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With