Best Capybara code snippet using Capybara.RSpecMatchers.Matchers.text
capybara.rbi
Source:capybara.rbi
...49 def self.enable_aria_role(*args, &block); end50 def self.enable_aria_role=(*args, &block); end51 def self.exact(*args, &block); end52 def self.exact=(*args, &block); end53 def self.exact_text(*args, &block); end54 def self.exact_text=(*args, &block); end55 def self.ignore_hidden_elements(*args, &block); end56 def self.ignore_hidden_elements=(*args, &block); end57 def self.javascript_driver(*args, &block); end58 def self.javascript_driver=(*args, &block); end59 def self.match(*args, &block); end60 def self.match=(*args, &block); end61 def self.mode; end62 def self.modify_selector(name, &block); end63 def self.predicates_wait(*args, &block); end64 def self.predicates_wait=(*args, &block); end65 def self.raise_server_errors(*args, &block); end66 def self.raise_server_errors=(*args, &block); end67 def self.register_driver(name, &block); end68 def self.register_server(name, &block); end69 def self.reset!; end70 def self.reset_sessions!; end71 def self.reuse_server(*args, &block); end72 def self.reuse_server=(*args, &block); end73 def self.run_default_server(app, port); end74 def self.run_server(*args, &block); end75 def self.run_server=(*args, &block); end76 def self.save_path(*args, &block); end77 def self.save_path=(*args, &block); end78 def self.server(*args, &block); end79 def self.server=(*args, &block); end80 def self.server_errors(*args, &block); end81 def self.server_errors=(*args, &block); end82 def self.server_host(*args, &block); end83 def self.server_host=(*args, &block); end84 def self.server_port(*args, &block); end85 def self.server_port=(*args, &block); end86 def self.servers; end87 def self.session_name; end88 def self.session_name=(name); end89 def self.session_options; end90 def self.session_pool; end91 def self.specified_session; end92 def self.specified_session=(session); end93 def self.string(html); end94 def self.test_id(*args, &block); end95 def self.test_id=(*args, &block); end96 def self.threadsafe(*args, &block); end97 def self.threadsafe=(*args, &block); end98 def self.use_default_driver; end99 def self.using_driver(driver); end100 def self.using_session(name_or_session, &block); end101 def self.using_wait_time(seconds); end102 def self.visible_text_only(*args, &block); end103 def self.visible_text_only=(*args, &block); end104 def self.w3c_click_offset(*args, &block); end105 def self.w3c_click_offset=(*args, &block); end106 extend Capybara::DSL107end108class Capybara::SessionConfig109 def always_include_port; end110 def always_include_port=(arg0); end111 def app_host; end112 def app_host=(url); end113 def asset_host; end114 def asset_host=(arg0); end115 def automatic_label_click; end116 def automatic_label_click=(arg0); end117 def automatic_reload; end118 def automatic_reload=(arg0); end119 def default_host; end120 def default_host=(url); end121 def default_max_wait_time; end122 def default_max_wait_time=(arg0); end123 def default_normalize_ws; end124 def default_normalize_ws=(arg0); end125 def default_selector; end126 def default_selector=(arg0); end127 def default_set_options; end128 def default_set_options=(arg0); end129 def disable_animation; end130 def disable_animation=(arg0); end131 def enable_aria_label; end132 def enable_aria_label=(arg0); end133 def enable_aria_role; end134 def enable_aria_role=(arg0); end135 def exact; end136 def exact=(arg0); end137 def exact_text; end138 def exact_text=(arg0); end139 def ignore_hidden_elements; end140 def ignore_hidden_elements=(arg0); end141 def initialize_copy(other); end142 def match; end143 def match=(arg0); end144 def predicates_wait; end145 def predicates_wait=(arg0); end146 def raise_server_errors; end147 def raise_server_errors=(arg0); end148 def run_server; end149 def run_server=(arg0); end150 def save_path; end151 def save_path=(arg0); end152 def server_errors; end153 def server_errors=(errors); end154 def server_host; end155 def server_host=(arg0); end156 def server_port; end157 def server_port=(arg0); end158 def test_id; end159 def test_id=(id); end160 def visible_text_only; end161 def visible_text_only=(arg0); end162 def w3c_click_offset; end163 def w3c_click_offset=(arg0); end164end165class Capybara::ReadOnlySessionConfig < SimpleDelegator166 def always_include_port=(_); end167 def app_host=(_); end168 def asset_host=(_); end169 def automatic_label_click=(_); end170 def automatic_reload=(_); end171 def default_host=(_); end172 def default_max_wait_time=(_); end173 def default_normalize_ws=(_); end174 def default_selector=(_); end175 def default_set_options=(_); end176 def disable_animation=(_); end177 def enable_aria_label=(_); end178 def enable_aria_role=(_); end179 def exact=(_); end180 def exact_text=(_); end181 def ignore_hidden_elements=(_); end182 def match=(_); end183 def predicates_wait=(_); end184 def raise_server_errors=(_); end185 def run_server=(_); end186 def save_path=(_); end187 def server_errors=(_); end188 def server_host=(_); end189 def server_port=(_); end190 def test_id=(_); end191 def visible_text_only=(_); end192 def w3c_click_offset=(_); end193end194class Capybara::Config195 def allow_gumbo; end196 def allow_gumbo=(arg0); end197 def always_include_port(*args, &block); end198 def always_include_port=(*args, &block); end199 def app; end200 def app=(arg0); end201 def app_host(*args, &block); end202 def app_host=(*args, &block); end203 def asset_host(*args, &block); end204 def asset_host=(*args, &block); end205 def automatic_label_click(*args, &block); end206 def automatic_label_click=(*args, &block); end207 def automatic_reload(*args, &block); end208 def automatic_reload=(*args, &block); end209 def default_driver; end210 def default_driver=(arg0); end211 def default_host(*args, &block); end212 def default_host=(*args, &block); end213 def default_max_wait_time(*args, &block); end214 def default_max_wait_time=(*args, &block); end215 def default_normalize_ws(*args, &block); end216 def default_normalize_ws=(*args, &block); end217 def default_selector(*args, &block); end218 def default_selector=(*args, &block); end219 def default_set_options(*args, &block); end220 def default_set_options=(*args, &block); end221 def deprecate(method, alternate_method, once: nil); end222 def disable_animation(*args, &block); end223 def disable_animation=(*args, &block); end224 def enable_aria_label(*args, &block); end225 def enable_aria_label=(*args, &block); end226 def enable_aria_role(*args, &block); end227 def enable_aria_role=(*args, &block); end228 def exact(*args, &block); end229 def exact=(*args, &block); end230 def exact_text(*args, &block); end231 def exact_text=(*args, &block); end232 def ignore_hidden_elements(*args, &block); end233 def ignore_hidden_elements=(*args, &block); end234 def initialize; end235 def javascript_driver; end236 def javascript_driver=(arg0); end237 def match(*args, &block); end238 def match=(*args, &block); end239 def predicates_wait(*args, &block); end240 def predicates_wait=(*args, &block); end241 def raise_server_errors(*args, &block); end242 def raise_server_errors=(*args, &block); end243 def reuse_server; end244 def reuse_server=(arg0); end245 def run_server(*args, &block); end246 def run_server=(*args, &block); end247 def save_path(*args, &block); end248 def save_path=(*args, &block); end249 def server; end250 def server=(name); end251 def server_errors(*args, &block); end252 def server_errors=(*args, &block); end253 def server_host(*args, &block); end254 def server_host=(*args, &block); end255 def server_port(*args, &block); end256 def server_port=(*args, &block); end257 def session_options; end258 def test_id(*args, &block); end259 def test_id=(*args, &block); end260 def threadsafe; end261 def threadsafe=(bool); end262 def visible_text_only(*args, &block); end263 def visible_text_only=(*args, &block); end264 def w3c_click_offset(*args, &block); end265 def w3c_click_offset=(*args, &block); end266 extend Forwardable267end268class Capybara::RegistrationContainer269 def [](name); end270 def []=(name, value); end271 def initialize; end272 def method_missing(method_name, *args, **options, &block); end273 def names; end274 def register(name, block); end275 def respond_to_missing?(method_name, include_all); end276end277module Capybara::Helpers278 def declension(singular, plural, count); end279 def filter_backtrace(trace); end280 def inject_asset_host(html, host: nil); end281 def monotonic_time; end282 def normalize_whitespace(text); end283 def self.declension(singular, plural, count); end284 def self.filter_backtrace(trace); end285 def self.inject_asset_host(html, host: nil); end286 def self.monotonic_time; end287 def self.normalize_whitespace(text); end288 def self.timer(expire_in:); end289 def self.to_regexp(text, exact: nil, all_whitespace: nil, options: nil); end290 def self.warn(message, uplevel: nil); end291 def timer(expire_in:); end292 def to_regexp(text, exact: nil, all_whitespace: nil, options: nil); end293 def warn(message, uplevel: nil); end294end295class Capybara::Helpers::Timer296 def current; end297 def expired?; end298 def initialize(expire_in); end299 def stalled?; end300end301module Capybara::SessionMatchers302 def _verify_current_path(path, filter_block, **options); end303 def assert_current_path(path, **options, &optional_filter_block); end304 def assert_no_current_path(path, **options, &optional_filter_block); end305 def has_current_path?(path, **options, &optional_filter_block); end306 def has_no_current_path?(path, **options, &optional_filter_block); end307 def make_predicate(options); end308end309class Capybara::Session310 def _find_frame(*args, **kw_args); end311 def _switch_to_window(window = nil, **options, &window_locator); end312 def _switch_to_window_by_locator; end313 def accept_alert(text = nil, **options, &blk); end314 def accept_confirm(text = nil, **options, &blk); end315 def accept_modal(type, text_or_options, options, &blk); end316 def accept_prompt(text = nil, **options, &blk); end317 def adjust_server_port(uri); end318 def all(**, &&); end319 def app; end320 def assert_all_of_selectors(**, &&); end321 def assert_any_of_selectors(**, &&); end322 def assert_no_selector(**, &&); end323 def assert_no_text(**, &&); end324 def assert_no_title(**, &&); end325 def assert_none_of_selectors(**, &&); end326 def assert_selector(**, &&); end327 def assert_text(**, &&); end328 def assert_title(**, &&); end329 def attach_file(**, &&); end330 def body; end331 def check(**, &&); end332 def choose(**, &&); end333 def cleanup!; end334 def click_button(**, &&); end335 def click_link(**, &&); end336 def click_link_or_button(**, &&); end337 def click_on(**, &&); end338 def config; end339 def configure; end340 def current_host; end341 def current_path; end342 def current_scope; end343 def current_url; end344 def current_window; end345 def default_fn(extension); end346 def dismiss_confirm(text = nil, **options, &blk); end347 def dismiss_modal(type, text_or_options, options, &blk); end348 def dismiss_prompt(text = nil, **options, &blk); end349 def document; end350 def driver; end351 def driver_args(args); end352 def element_script_result(arg); end353 def evaluate_async_script(script, *args); end354 def evaluate_script(script, *args); end355 def execute_script(script, *args); end356 def fill_in(**, &&); end357 def find(**, &&); end358 def find_all(**, &&); end359 def find_button(**, &&); end360 def find_by_id(**, &&); end361 def find_field(**, &&); end362 def find_link(**, &&); end363 def first(**, &&); end364 def go_back; end365 def go_forward; end366 def has_button?(**, &&); end367 def has_checked_field?(**, &&); end368 def has_content?(**, &&); end369 def has_css?(**, &&); end370 def has_field?(**, &&); end371 def has_link?(**, &&); end372 def has_no_button?(**, &&); end373 def has_no_checked_field?(**, &&); end374 def has_no_content?(**, &&); end375 def has_no_css?(**, &&); end376 def has_no_field?(**, &&); end377 def has_no_link?(**, &&); end378 def has_no_select?(**, &&); end379 def has_no_selector?(**, &&); end380 def has_no_table?(**, &&); end381 def has_no_text?(**, &&); end382 def has_no_title?(**, &&); end383 def has_no_unchecked_field?(**, &&); end384 def has_no_xpath?(**, &&); end385 def has_select?(**, &&); end386 def has_selector?(**, &&); end387 def has_table?(**, &&); end388 def has_text?(**, &&); end389 def has_title?(**, &&); end390 def has_unchecked_field?(**, &&); end391 def has_xpath?(**, &&); end392 def html; end393 def initialize(mode, app = nil); end394 def inspect; end395 def modal_options(text = nil, **options); end396 def mode; end397 def open_file(path); end398 def open_new_window(kind = nil); end399 def prepare_path(path, extension); end400 def query(**, &&); end401 def quit; end402 def raise_server_error!; end403 def refresh; end404 def refute_selector(**, &&); end405 def reset!; end406 def reset_session!; end407 def response_headers; end408 def save_and_open_page(path = nil); end409 def save_and_open_screenshot(path = nil, **options); end410 def save_page(path = nil); end411 def save_screenshot(path = nil, **options); end412 def scopes; end413 def scroll_by(**, &&); end414 def scroll_to(**, &&); end415 def select(**, &&); end416 def self.instance_created?; end417 def send_keys(*args, **kw_args); end418 def server; end419 def server_url; end420 def source; end421 def status_code; end422 def switch_to_frame(frame); end423 def switch_to_window(window = nil, **options, &window_locator); end424 def synchronize_windows(options, &block); end425 def synchronized; end426 def synchronized=(arg0); end427 def text(**, &&); end428 def title(**, &&); end429 def uncheck(**, &&); end430 def unselect(**, &&); end431 def using_wait_time(seconds, &block); end432 def visit(visit_uri); end433 def window_opened_by(**options); end434 def windows; end435 def within(*args, **kw_args); end436 def within_element(*args, **kw_args); end437 def within_fieldset(locator, &block); end438 def within_frame(*args, **kw_args); end439 def within_table(locator, &block); end440 def within_window(window_or_proc); end441 include Capybara::SessionMatchers442end443class Capybara::Window444 def ==(other); end445 def close; end446 def closed?; end447 def current?; end448 def eql?(other); end449 def exists?; end450 def fullscreen; end451 def handle; end452 def hash; end453 def initialize(session, handle); end454 def inspect; end455 def maximize; end456 def resize_to(width, height); end457 def session; end458 def size; end459 def wait_for_stable_size(seconds = nil); end460end461class Capybara::Server462 def app; end463 def base_url; end464 def boot; end465 def error; end466 def find_available_port(host); end467 def host; end468 def initialize(app, *deprecated_options, port: nil, host: nil, reportable_errors: nil, extra_middleware: nil); end469 def middleware; end470 def pending_requests?; end471 def port; end472 def port_key; end473 def reset_error!; end474 def responsive?; end475 def self.ports; end476 def using_ssl?; end477 def wait_for_pending_requests; end478end479class Capybara::Server::Middleware480 def call(env); end481 def clear_error; end482 def error; end483 def initialize(app, server_errors, extra_middleware = nil); end484 def pending_requests; end485 def pending_requests?; end486end487class Capybara::Server::Middleware::Counter488 def decrement(uri); end489 def increment(uri); end490 def initialize; end491 def positive?; end492 def value; end493end494class Capybara::Server::AnimationDisabler495 def call(env); end496 def disable_markup; end497 def html_content?; end498 def initialize(app); end499 def insert_disable(html); end500 def self.selector_for(css_or_bool); end501end502class Capybara::Server::Checker503 def http_request(&block); end504 def https_request(&block); end505 def initialize(host, port); end506 def make_request(**options, &block); end507 def request(&block); end508 def ssl?; end509 def ssl_options; end510end511module XPath512end513class XPath::Renderer514 def join(*expressions); end515end516module XPath::DSL517 def join(*expressions); end518end519class Capybara::Selector < SimpleDelegator520 def add_error(error_msg); end521 def builder(expr = nil); end522 def call(locator, **options); end523 def current_format; end524 def enable_aria_label; end525 def enable_aria_role; end526 def errors; end527 def expression_for(name, locator, config: nil, format: nil, **options); end528 def find_by_attr(attribute, value); end529 def find_by_class_attr(classes); end530 def format; end531 def initialize(definition, config:, format:); end532 def locate_field(xpath, locator, **_options); end533 def locate_label(locator); end534 def locator_description; end535 def locator_valid?(locator); end536 def self.[](name); end537 def self.add(name, **options, &block); end538 def self.all; end539 def self.for(locator); end540 def self.remove(name); end541 def self.update(name, &block); end542 def test_id; end543 def with_filter_errors(errors); end544end545module Capybara::Selector::Filters546end547class Capybara::Selector::Filters::Base548 def apply(subject, name, value, skip_value, ctx); end549 def boolean?; end550 def default; end551 def default?; end552 def filter_context(context); end553 def format; end554 def handles_option?(option_name); end555 def initialize(name, matcher, block, **options); end556 def matcher?; end557 def skip?(value); end558 def valid_value?(value); end559end560class Capybara::Selector::Filters::NodeFilter < Capybara::Selector::Filters::Base561 def initialize(name, matcher, block, **options); end562 def matches?(node, name, value, context = nil); end563end564class Capybara::Selector::Filters::ExpressionFilter < Capybara::Selector::Filters::Base565 def apply_filter(expr, name, value, selector); end566end567class Capybara::Selector::Filters::IdentityExpressionFilter < Capybara::Selector::Filters::ExpressionFilter568 def apply_filter(expr, _name, _value, _ctx); end569 def default?; end570 def initialize(name); end571 def matcher?; end572end573class Capybara::Selector::Filters::LocatorFilter < Capybara::Selector::Filters::NodeFilter574 def apply(subject, value, skip_value, ctx, **options); end575 def initialize(block, **options); end576 def matches?(node, value, context = nil, exact:); end577end578class Capybara::Selector::FilterSet579 def add_filter(name, filter_class, *types, matcher: nil, **options, &block); end580 def describe(what = nil, &block); end581 def description(node_filters: nil, expression_filters: nil, **options); end582 def descriptions; end583 def expression_filter(name, *types, **options, &block); end584 def expression_filter_descriptions; end585 def expression_filters; end586 def filter(names, *types, **options, &block); end587 def import(name, filters = nil); end588 def initialize(name, &block); end589 def node_filter(names, *types, **options, &block); end590 def node_filter_descriptions; end591 def node_filters; end592 def options_with_defaults(options); end593 def self.[](name); end594 def self.add(name, &block); end595 def self.all; end596 def self.remove(name); end597 def undeclared_descriptions; end598end599class Capybara::Selector::CSS600 def self.escape(str); end601 def self.escape_char(char); end602 def self.split(css); end603end604class Capybara::Selector::CSS::Splitter605 def parse_block(start, final, strio); end606 def parse_paren(strio); end607 def parse_square(strio); end608 def parse_string(quote, strio); end609 def split(css); end610end611class Capybara::Selector::RegexpDisassembler612 def alternated_substrings; end613 def collapse(strs); end614 def combine(strs); end615 def extract_strings(expression, alternation: nil); end616 def initialize(regexp); end617 def process(alternation:); end618 def remove_and_covered(strings); end619 def remove_or_covered(or_series); end620 def substrings; end621end622class Capybara::Selector::RegexpDisassembler::Expression623 def alternation?; end624 def alternative_strings; end625 def alternatives; end626 def each; end627 def extract_strings(process_alternatives); end628 def fixed_repeat?; end629 def ignore?; end630 def indeterminate?; end631 def initialize(exp); end632 def max_repeat; end633 def min_repeat; end634 def optional?; end635 def optional_strings; end636 def options_set(strs); end637 def repeat_set(str); end638 def repeated_strings(process_alternatives); end639 def strings(process_alternatives); end640 def terminal?; end641 def terminal_strings; end642 def type; end643end644class Capybara::Selector::XPathBuilder645 def add_attribute_conditions(**conditions); end646 def attribute_conditions(attributes); end647 def class_conditions(classes); end648 def expression; end649 def initialize(expression); end650 def regexp_to_xpath_conditions(regexp); end651end652class Capybara::Selector::CSSBuilder653 def add_attribute_conditions(**attributes); end654 def attribute_conditions(attributes); end655 def class_conditions(classes); end656 def expression; end657 def initialize(expression); end658 def regexp_conditions(name, value); end659end660class Capybara::Selector::Definition661 def css(*allowed_filters, &block); end662 def custom_filters; end663 def default_format; end664 def default_visibility(fallback = nil, options = nil); end665 def describe(*args, &block); end666 def describe_all_expression_filters(**opts); end667 def describe_expression_filters(&block); end668 def describe_node_filters(&block); end669 def description(*args, &block); end670 def expression(type, allowed_filters, &block); end671 def expression_filter(*args, &block); end672 def expression_filters; end673 def expressions; end674 def filter(*args, &block); end675 def filter_set(name, filters_to_use = nil); end676 def handled_custom_options(filter, options); end677 def initialize(name, locator_type: nil, raw_locator: nil, supports_exact: nil, &block); end678 def label(label = nil); end679 def locator_filter(*types, **options, &block); end680 def locator_types; end681 def match(&block); end682 def match?(locator); end683 def name; end684 def node_filter(*args, &block); end685 def node_filters; end686 def parameter_names(block); end687 def raw_locator?; end688 def supports_exact?; end689 def visible(default_visibility = nil, &block); end690 def xpath(*allowed_filters, &block); end691 extend Forwardable692end693class Capybara::Result694 def [](*args); end695 def add_to_cache(elem); end696 def allow_reload!; end697 def at(*args); end698 def compare_count; end699 def each(&block); end700 def empty?; end701 def failure_message; end702 def full_results; end703 def index(*arg0); end704 def initialize(elements, query); end705 def inspect(*args, &block); end706 def last(*args, &block); end707 def lazy_select_elements(&block); end708 def length(*args, &block); end709 def load_up_to(num); end710 def matches_count?; end711 def negative_failure_message; end712 def rest; end713 def sample(*args, &block); end714 def size(*args, &block); end715 def unfiltered_size; end716 def values_at(*args, &block); end717 extend Forwardable718 include Enumerable719end720module Capybara::Queries721end722class Capybara::Queries::BaseQuery723 def assert_valid_keys; end724 def count_message; end725 def count_specified?; end726 def expects_none?; end727 def failure_message; end728 def initialize(options); end729 def matches_count?(count); end730 def negative_failure_message; end731 def occurrences(count); end732 def options; end733 def self.wait(options, default = nil); end734 def session_options; end735 def session_options=(arg0); end736 def wait; end737end738class Capybara::Queries::SelectorQuery < Capybara::Queries::BaseQuery739 def applied_description; end740 def applied_filters; end741 def apply_expression_filters(expression); end742 def apply_filter?(filter); end743 def assert_valid_keys; end744 def builder(expr); end745 def css; end746 def custom_keys; end747 def default_visibility; end748 def describe_within?; end749 def description(only_applied = nil); end750 def document?(node); end751 def exact?; end752 def exact_text; end753 def expression; end754 def expression_filters; end755 def failure_message; end756 def filter_set(name); end757 def filtered_expression(expr); end758 def find_nodes_by_selector_format(node, exact); end759 def find_selector(locator); end760 def first_try?; end761 def initialize(*args, session_options:, enable_aria_label: nil, enable_aria_role: nil, test_id: nil, selector_format: nil, order: nil, **options, &filter_block); end762 def label; end763 def locator; end764 def match; end765 def matches_class_filter?(node); end766 def matches_exact_text_filter?(node); end767 def matches_filter_block?(node); end768 def matches_filters?(node, node_filter_errors = nil); end769 def matches_id_filter?(node); end770 def matches_locator_filter?(node); end771 def matches_node_filters?(node, errors); end772 def matches_spatial_filters?(node); end773 def matches_style?(node, styles); end774 def matches_style_filter?(node); end775 def matches_system_filters?(node); end776 def matches_text_exactly?(node, value); end777 def matches_text_filter?(node); end778 def matches_text_regexp?(node, regexp); end779 def matches_visibility_filters?(node); end780 def matching_text; end781 def name; end782 def need_to_process_classes?; end783 def negative_failure_message; end784 def node_filters; end785 def normalize_ws; end786 def options; end787 def ordered_results(results); end788 def position_cache(key); end789 def rect_cache(key); end790 def resolve_for(node, exact = nil); end791 def selector; end792 def selector_format; end793 def show_for_stage(only_applied); end794 def simple_root?(node); end795 def supports_exact?; end796 def text_fragments; end797 def to_element(node); end798 def try_text_match_in_expression?; end799 def use_default_class_filter?; end800 def use_default_id_filter?; end801 def use_default_style_filter?; end802 def use_spatial_filter?; end803 def valid_keys; end804 def visible; end805 def warn_exact_usage; end806 def xpath(exact = nil); end807 def xpath_text_conditions; end808end809class Capybara::Queries::SelectorQuery::Rectangle810 def above?(other); end811 def below?(other); end812 def bottom; end813 def distance(other); end814 def distance_segment_segment(l1p1, l1p2, l2p1, l2p2); end815 def initialize(position); end816 def left; end817 def left_of?(other); end818 def line_segments; end819 def near?(other); end820 def right; end821 def right_of?(other); end822 def top; end823end824class Capybara::Queries::TextQuery < Capybara::Queries::BaseQuery825 def build_message(report_on_invisible); end826 def case_insensitive_message; end827 def check_case_insensitive?; end828 def check_visible_text?; end829 def default_type; end830 def description; end831 def exact?; end832 def failure_message; end833 def initialize(type = nil, expected_text, session_options:, **options); end834 def invisible_message; end835 def negative_failure_message; end836 def resolve_for(node); end837 def text(node: nil, query_type: nil); end838 def valid_keys; end839 def valid_types; end840end841class Capybara::Queries::TitleQuery < Capybara::Queries::BaseQuery842 def failure_message; end843 def failure_message_helper(negated = nil); end844 def initialize(expected_title, **options); end845 def negative_failure_message; end846 def resolves_for?(node); end847 def valid_keys; end848end849class Capybara::Queries::CurrentPathQuery < Capybara::Queries::BaseQuery850 def failure_message; end851 def failure_message_helper(negated = nil); end852 def initialize(expected_path, **options, &optional_filter_block); end853 def matches_filter_block?(url); end854 def negative_failure_message; end855 def resolves_for?(session); end856 def valid_keys; end857end858class Capybara::Queries::MatchQuery < Capybara::Queries::SelectorQuery859 def assert_valid_keys; end860 def valid_keys; end861 def visible; end862end863class Capybara::Queries::AncestorQuery < Capybara::Queries::SelectorQuery864 def description(applied = nil); end865 def resolve_for(node, exact = nil); end866end867class Capybara::Queries::SiblingQuery < Capybara::Queries::SelectorQuery868 def description(applied = nil); end869 def resolve_for(node, exact = nil); end870end871class Capybara::Queries::StyleQuery < Capybara::Queries::BaseQuery872 def failure_message; end873 def initialize(expected_styles, session_options:, **options); end874 def resolves_for?(node); end875 def stringify_keys(hsh); end876 def valid_keys; end877end878module Capybara::Node879end880module Capybara::Node::Finders881 def all(*args, allow_reload: nil, **options, &optional_filter_block); end882 def ambiguous?(query, result); end883 def ancestor(*args, **options, &optional_filter_block); end884 def find(*args, **options, &optional_filter_block); end885 def find_all(*args, allow_reload: nil, **options, &optional_filter_block); end886 def find_button(locator = nil, **options, &optional_filter_block); end887 def find_by_id(id, **options, &optional_filter_block); end888 def find_field(locator = nil, **options, &optional_filter_block); end889 def find_link(locator = nil, **options, &optional_filter_block); end890 def first(*args, **options, &optional_filter_block); end891 def options_include_minimum?(opts); end892 def parent; end893 def prefer_exact?(query); end894 def sibling(*args, **options, &optional_filter_block); end895 def synced_resolve(query); end896end897module Capybara::Node::Matchers898 def ==(other); end899 def _set_query_session_options(*query_args); end900 def _verify_match_result(query_args, optional_filter_block); end901 def _verify_multiple(*args, wait: nil, **options); end902 def _verify_selector_result(query_args, optional_filter_block, query_type = nil); end903 def _verify_text(type = nil, expected_text, **query_options); end904 def assert_all_of_selectors(*args, **options, &optional_filter_block); end905 def assert_ancestor(*args, &optional_filter_block); end906 def assert_any_of_selectors(*args, wait: nil, **options, &optional_filter_block); end907 def assert_matches_selector(*args, &optional_filter_block); end908 def assert_matches_style(styles = nil, **options); end909 def assert_no_ancestor(*args, &optional_filter_block); end910 def assert_no_selector(*args, &optional_filter_block); end911 def assert_no_sibling(*args, &optional_filter_block); end912 def assert_no_text(type_or_text, *args, **opts); end913 def assert_none_of_selectors(*args, **options, &optional_filter_block); end914 def assert_not_matches_selector(*args, &optional_filter_block); end915 def assert_selector(*args, &optional_filter_block); end916 def assert_sibling(*args, &optional_filter_block); end917 def assert_style(styles = nil, **options); end918 def assert_text(type_or_text, *args, **opts); end919 def extract_selector(args); end920 def has_ancestor?(*args, **options, &optional_filter_block); end921 def has_button?(locator = nil, **options, &optional_filter_block); end922 def has_checked_field?(locator = nil, **options, &optional_filter_block); end923 def has_content?(*args, **options); end924 def has_css?(path, **options, &optional_filter_block); end925 def has_field?(locator = nil, **options, &optional_filter_block); end926 def has_link?(locator = nil, **options, &optional_filter_block); end927 def has_no_ancestor?(*args, **options, &optional_filter_block); end928 def has_no_button?(locator = nil, **options, &optional_filter_block); end929 def has_no_checked_field?(locator = nil, **options, &optional_filter_block); end930 def has_no_content?(*args, **options); end931 def has_no_css?(path, **options, &optional_filter_block); end932 def has_no_field?(locator = nil, **options, &optional_filter_block); end933 def has_no_link?(locator = nil, **options, &optional_filter_block); end934 def has_no_select?(locator = nil, **options, &optional_filter_block); end935 def has_no_selector?(*args, **options, &optional_filter_block); end936 def has_no_sibling?(*args, **options, &optional_filter_block); end937 def has_no_table?(locator = nil, **options, &optional_filter_block); end938 def has_no_text?(*args, **options); end939 def has_no_unchecked_field?(locator = nil, **options, &optional_filter_block); end940 def has_no_xpath?(path, **options, &optional_filter_block); end941 def has_select?(locator = nil, **options, &optional_filter_block); end942 def has_selector?(*args, **options, &optional_filter_block); end943 def has_sibling?(*args, **options, &optional_filter_block); end944 def has_style?(styles = nil, **options); end945 def has_table?(locator = nil, **options, &optional_filter_block); end946 def has_text?(*args, **options); end947 def has_unchecked_field?(locator = nil, **options, &optional_filter_block); end948 def has_xpath?(path, **options, &optional_filter_block); end949 def make_predicate(options); end950 def matches_css?(css, **options, &optional_filter_block); end951 def matches_selector?(*args, **options, &optional_filter_block); end952 def matches_style?(styles = nil, **options); end953 def matches_xpath?(xpath, **options, &optional_filter_block); end954 def not_matches_css?(css, **options, &optional_filter_block); end955 def not_matches_selector?(*args, **options, &optional_filter_block); end956 def not_matches_xpath?(xpath, **options, &optional_filter_block); end957end958module Capybara::Node::Actions959 def _check_with_label(selector, checked, locator, allow_label_click: nil, **options); end960 def _reset_style(element); end961 def _update_style(element, style); end962 def attach_file(locator = nil, paths, make_visible: nil, **options); end963 def check(locator = nil, **options); end964 def choose(locator = nil, **options); end965 def click_button(locator = nil, **options); end966 def click_link(locator = nil, **options); end967 def click_link_or_button(locator = nil, **options); end968 def click_on(locator = nil, **options); end969 def fill_in(locator = nil, with:, currently_with: nil, fill_options: nil, **find_options); end970 def find_select_or_datalist_input(from, options); end971 def select(value = nil, from: nil, **options); end972 def select_datalist_option(input, value); end973 def uncheck(locator = nil, **options); end974 def unselect(value = nil, from: nil, **options); end975 def while_visible(element, visible_css); end976end977module Capybara::Node::DocumentMatchers978 def _verify_title(title, options); end979 def assert_no_title(title, **options); end980 def assert_title(title, **options); end981 def has_no_title?(title, **options); end982 def has_title?(title, **options); end983end984class Capybara::Node::Simple985 def [](name); end986 def allow_reload!(*arg0); end987 def checked?; end988 def disabled?; end989 def find_css(css, **_options); end990 def find_xpath(xpath, **_options); end991 def initial_cache; end992 def initialize(native); end993 def inspect; end994 def multiple?; end995 def native; end996 def option_value(option); end997 def path; end998 def readonly?; end999 def selected?; end1000 def session_options; end1001 def synchronize(_seconds = nil); end1002 def tag_name; end1003 def text(_type = nil, normalize_ws: nil); end1004 def title; end1005 def value; end1006 def visible?(check_ancestors = nil); end1007 include Capybara::Node::DocumentMatchers1008 include Capybara::Node::Finders1009 include Capybara::Node::Matchers1010end1011class Capybara::Node::Base1012 def base; end1013 def catch_error?(error, errors = nil); end1014 def driver; end1015 def find_css(css, **options); end1016 def find_xpath(xpath, **options); end1017 def initialize(session, base); end1018 def query_scope; end1019 def reload; end1020 def session; end1021 def session_options; end1022 def synchronize(seconds = nil, errors: nil); end1023 def to_capybara_node; end1024 include Capybara::Node::Actions1025 include Capybara::Node::Finders1026 include Capybara::Node::Matchers1027end1028class Capybara::Node::Element < Capybara::Node::Base1029 def [](attribute); end1030 def allow_reload!(idx = nil); end1031 def checked?; end1032 def click(*keys, **options); end1033 def disabled?; end1034 def double_click(*keys, **options); end1035 def drag_to(node, **options); end1036 def drop(*args); end1037 def evaluate_async_script(script, *args); end1038 def evaluate_script(script, *args); end1039 def execute_script(script, *args); end1040 def flash; end1041 def hover; end1042 def initial_cache; end1043 def initialize(session, base, query_scope, query); end1044 def inspect; end1045 def multiple?; end1046 def native; end1047 def obscured?; end1048 def path; end1049 def perform_click_action(keys, wait: nil, **options); end1050 def readonly?; end1051 def rect; end1052 def reload; end1053 def right_click(*keys, **options); end1054 def scroll_to(pos_or_el_or_x, y = nil, align: nil, offset: nil); end1055 def select_option(wait: nil); end1056 def selected?; end1057 def send_keys(*args); end1058 def set(value, **options); end1059 def style(*styles); end1060 def tag_name; end1061 def text(type = nil, normalize_ws: nil); end1062 def trigger(event); end1063 def unselect_option(wait: nil); end1064 def value; end1065 def visible?; end1066end1067class Capybara::Node::Document < Capybara::Node::Base1068 def evaluate_script(*args); end1069 def execute_script(*args); end1070 def inspect; end1071 def scroll_to(*args, **options); end1072 def text(type = nil, normalize_ws: nil); end1073 def title; end1074 include Capybara::Node::DocumentMatchers1075end1076class Capybara::Driver::Base1077 def accept_modal(type, **options, &blk); end1078 def close_window(handle); end1079 def current_url; end1080 def current_window_handle; end1081 def dismiss_modal(type, **options, &blk); end1082 def evaluate_async_script(script, *args); end1083 def evaluate_script(script, *args); end1084 def execute_script(script, *args); end1085 def find_css(query, **options); end1086 def find_xpath(query, **options); end1087 def frame_title; end1088 def frame_url; end1089 def fullscreen_window(handle); end1090 def go_back; end1091 def go_forward; end1092 def html; end1093 def invalid_element_errors; end1094 def maximize_window(handle); end1095 def needs_server?; end1096 def no_such_window_error; end1097 def open_new_window; end1098 def refresh; end1099 def reset!; end1100 def resize_window_to(handle, width, height); end1101 def response_headers; end1102 def save_screenshot(path, **options); end1103 def send_keys(*arg0); end1104 def session; end1105 def session=(arg0); end1106 def session_options; end1107 def status_code; end1108 def switch_to_frame(frame); end1109 def switch_to_window(handle); end1110 def visit(path); end1111 def wait?; end1112 def window_handles; end1113 def window_size(handle); end1114end1115module Capybara::Driver1116end1117class Capybara::Driver::Node1118 def ==(other); end1119 def [](name); end1120 def all_text; end1121 def checked?; end1122 def click(keys = nil, **options); end1123 def disabled?; end1124 def double_click(keys = nil, **options); end1125 def drag_to(element, **options); end1126 def driver; end1127 def drop(*args); end1128 def hover; end1129 def initial_cache; end1130 def initialize(driver, native, initial_cache = nil); end1131 def inspect; end1132 def multiple?; end1133 def native; end1134 def obscured?; end1135 def path; end1136 def readonly?; end1137 def rect; end1138 def right_click(keys = nil, **options); end1139 def scroll_by(x, y); end1140 def scroll_to(element, alignment, position = nil); end1141 def select_option; end1142 def selected?; end1143 def send_keys(*args); end1144 def set(value, **options); end1145 def style(styles); end1146 def tag_name; end1147 def trigger(event); end1148 def unselect_option; end1149 def value; end1150 def visible?; end1151 def visible_text; end1152end1153class Capybara::RackTest::Driver < Capybara::Driver::Base1154 def app; end1155 def browser; end1156 def current_url; end1157 def delete(*args, &block); end1158 def dom; end1159 def find_css(selector); end1160 def find_xpath(selector); end1161 def follow(method, path, **attributes); end1162 def follow_redirects?; end1163 def get(*args, &block); end1164 def header(key, value); end1165 def html; end1166 def initialize(app, **options); end1167 def invalid_element_errors; end1168 def options; end1169 def post(*args, &block); end1170 def put(*args, &block); end1171 def redirect_limit; end1172 def refresh; end1173 def request; end1174 def reset!; end1175 def response; end1176 def response_headers; end1177 def status_code; end1178 def submit(method, path, attributes); end1179 def title; end1180 def visit(path, **attributes); end1181end1182module Capybara::RackTest::Errors1183end1184class Capybara::RackTest::Errors::StaleElementReferenceError < StandardError1185end1186class Capybara::RackTest::Node < Capybara::Driver::Node1187 def ==(other); end1188 def [](**, &&); end1189 def all_text(**, &&); end1190 def attribute_is_not_blank?(attribute); end1191 def checkable?; end1192 def checkbox?; end1193 def checkbox_or_radio?(field = nil); end1194 def checked?(**, &&); end1195 def click(**, &&); end1196 def click_label; end1197 def deselect_options; end1198 def disabled?(**, &&); end1199 def displayed_text(check_ancestor: nil); end1200 def find_css(**, &&); end1201 def find_xpath(**, &&); end1202 def follow_link; end1203 def form; end1204 def input_field?; end1205 def link?; end1206 def path(**, &&); end1207 def radio?; end1208 def range?; end1209 def select_node; end1210 def select_option(**, &&); end1211 def selected?(**, &&); end1212 def set(**, &&); end1213 def set_checkbox(value); end1214 def set_input(value); end1215 def set_radio(_value); end1216 def set_range(value); end1217 def stale_check; end1218 def string_node; end1219 def style(**, &&); end1220 def submits?; end1221 def tag_name(**, &&); end1222 def text_or_password?; end1223 def textarea?; end1224 def toggle_details(details = nil); end1225 def type; end1226 def unchecked_all_text; end1227 def unchecked_checked?; end1228 def unchecked_click(keys = nil, **options); end1229 def unchecked_disabled?; end1230 def unchecked_find_css(locator, **_hints); end1231 def unchecked_find_xpath(locator, **_hints); end1232 def unchecked_path; end1233 def unchecked_select_option; end1234 def unchecked_selected?; end1235 def unchecked_set(value, **options); end1236 def unchecked_style(_styles); end1237 def unchecked_tag_name; end1238 def unchecked_unselect_option; end1239 def unchecked_value; end1240 def unchecked_visible?; end1241 def unchecked_visible_text; end1242 def unselect_option(**, &&); end1243 def value(**, &&); end1244 def visible?(**, &&); end1245 def visible_text(**, &&); end1246end1247class Capybara::RackTest::Form < Capybara::RackTest::Node1248 def add_input_param(field, params); end1249 def add_select_param(field, params); end1250 def add_textarea_param(field, params); end1251 def file_to_upload(filename); end1252 def make_params; end1253 def merge_param!(params, key, value); end1254 def multipart?; end1255 def params(button); end1256 def request_method; end1257 def submit(button); end1258 def submitter?(el); end1259end1260class Capybara::RackTest::Form::NilUploadedFile < Rack::Test::UploadedFile1261 def content_type; end1262 def initialize; end1263 def original_filename; end1264 def path; end1265 def read; end1266 def size; end1267end1268class Capybara::RackTest::Form::ParamsHash < Hash1269 def to_params_hash; end1270end1271class Capybara::RackTest::Browser1272 def app; end1273 def build_rack_mock_session; end1274 def build_uri(path); end1275 def current_host; end1276 def current_host=(arg0); end1277 def current_url; end1278 def dom; end1279 def driver; end1280 def find(format, selector); end1281 def follow(method, path, **attributes); end1282 def fragment_or_script?(path); end1283 def html; end1284 def initialize(driver); end1285 def options; end1286 def process(method, path, attributes = nil, env = nil); end1287 def process_and_follow_redirects(method, path, attributes = nil, env = nil); end1288 def refresh; end1289 def request_path; end1290 def reset_cache!; end1291 def reset_host!; end1292 def submit(method, path, attributes); end1293 def title; end1294 def visit(path, **attributes); end1295 include Rack::Test::Methods1296end1297class Capybara::RackTest::CSSHandlers < BasicObject1298 def disabled(list); end1299 def enabled(list); end1300 include Kernel1301end1302module Capybara::Selenium1303end1304module Capybara::Selenium::Find1305 def build_hints_js(uses_visibility, styles, position); end1306 def es_context; end1307 def filter_by_text(elements, texts); end1308 def find_by(format, selector, uses_visibility:, texts:, styles:, position:); end1309 def find_css(selector, uses_visibility: nil, texts: nil, styles: nil, position: nil, **_options); end1310 def find_xpath(selector, uses_visibility: nil, styles: nil, position: nil, **_options); end1311 def gather_hints(elements, uses_visibility:, styles:, position:); end1312 def is_displayed_atom; end1313end1314module Capybara::Selenium::Scroll1315 def scroll_by(x, y); end1316 def scroll_element_to_location(element, location); end1317 def scroll_to(element, location, position = nil); end1318 def scroll_to_coords(x, y); end1319 def scroll_to_location(location); end1320end1321class Capybara::Selenium::Node < Capybara::Driver::Node1322 def ==(other); end1323 def [](name); end1324 def action_with_modifiers(click_options); end1325 def all_text; end1326 def attrs(*attr_names); end1327 def auto_rapid_set_length; end1328 def boolean_attr(val); end1329 def bridge; end1330 def browser; end1331 def browser_action; end1332 def build_node(native_node, initial_cache = nil); end1333 def capabilities; end1334 def checked?; end1335 def click(keys = nil, **options); end1336 def content_editable?; end1337 def disabled?; end1338 def double_click(keys = nil, **options); end1339 def drag_to(element, drop_modifiers: nil, **arg2); end1340 def drop(*_); end1341 def each_key(keys, &block); end1342 def find_context; end1343 def hover; end1344 def modifiers_down(actions, keys); end1345 def modifiers_up(actions, keys); end1346 def multiple?; end1347 def normalize_keys(keys); end1348 def obscured?(x: nil, y: nil); end1349 def path; end1350 def perform_with_options(click_options, &block); end1351 def readonly?; end1352 def rect; end1353 def right_click(keys = nil, **options); end1354 def scroll_if_needed; end1355 def scroll_to_center; end1356 def select_node; end1357 def select_option; end1358 def selected?; end1359 def send_keys(*args); end1360 def set(value, **options); end1361 def set_color(value); end1362 def set_content_editable(value); end1363 def set_date(value); end1364 def set_datetime_local(value); end1365 def set_file(value); end1366 def set_range(value); end1367 def set_text(value, clear: nil, rapid: nil, **_unused); end1368 def set_time(value); end1369 def sibling_index(parent, node, selector); end1370 def style(styles); end1371 def tag_name; end1372 def unselect_option; end1373 def update_value_js(value); end1374 def value; end1375 def visible?; end1376 def visible_text; end1377 def w3c?; end1378 def with_file_detector; end1379 include Capybara::Selenium::Find1380 include Capybara::Selenium::Scroll1381end1382class Capybara::Selenium::Node::SettableValue1383 def dateable?; end1384 def initialize(value); end1385 def timeable?; end1386 def to_date_str; end1387 def to_datetime_str; end1388 def to_s; end1389 def to_time_str; end1390 def value; end1391end1392class Capybara::Selenium::Node::ClickOptions1393 def center_offset?; end1394 def coords; end1395 def coords?; end1396 def delay; end1397 def empty?; end1398 def initialize(keys, options); end1399 def keys; end1400 def options; end1401end1402module Capybara::Selenium::Node::Html5Drag1403 def drag_to(element, html5: nil, delay: nil, drop_modifiers: nil); end1404 def html5_drop(*args); end1405 def perform_html5_drag(element, delay, drop_modifiers); end1406 def perform_legacy_drag(element, drop_modifiers); end1407end1408module Capybara::Selenium::Node::FileInputClickEmulation1409 def attaching_file?; end1410 def click(keys = nil, **options); end1411 def emulate_click; end1412 def visible_file_field?; end1413end1414class Capybara::Selenium::ChromeNode < Capybara::Selenium::Node1415 def browser_version(to_float: nil); end1416 def chromedriver_fixed_actions_key_state?; end1417 def chromedriver_supports_displayed_endpoint?; end1418 def chromedriver_version; end1419 def click(*arg0, **arg1); end1420 def disabled?; end1421 def drop(*args); end1422 def file_errors; end1423 def native_displayed?; end1424 def perform_legacy_drag(element, drop_modifiers); end1425 def select_option; end1426 def send_keys(*args); end1427 def set_file(value); end1428 def set_text(value, clear: nil, **_unused); end1429 def visible?; end1430 include Capybara::Selenium::Node::FileInputClickEmulation1431 include Capybara::Selenium::Node::Html5Drag1432end1433module Capybara::Selenium::ChromeLogs1434 def available_log_types; end1435 def commands(command); end1436 def log(type); end1437end1438module Capybara::Selenium::Driver::ChromeDriver1439 def build_node(native_node, initial_cache = nil); end1440 def cdp_unsupported_errors; end1441 def chromedriver_version; end1442 def clear_all_storage?; end1443 def clear_storage; end1444 def delete_all_cookies; end1445 def execute_cdp(cmd, params = nil); end1446 def fullscreen_window(handle); end1447 def reset!; end1448 def resize_window_to(handle, width, height); end1449 def self.extended(base); end1450 def storage_clears; end1451 def storage_types_to_clear; end1452 def uniform_storage_clear?; end1453end1454class Capybara::Selenium::FirefoxNode < Capybara::Selenium::Node1455 def _send_keys(keys, actions = nil, down_keys = nil); end1456 def browser_version; end1457 def click(keys = nil, **options); end1458 def disabled?; end1459 def drop(*args); end1460 def focused?; end1461 def hover; end1462 def native_displayed?; end1463 def perform_with_options(click_options); end1464 def select_option; end1465 def send_keys(*args); end1466 def set_file(value); end1467 def upload(local_file); end1468 def visible?; end1469 include Capybara::Selenium::Node::FileInputClickEmulation1470 include Capybara::Selenium::Node::Html5Drag1471end1472module Capybara::Selenium::Driver::FirefoxDriver1473 def self.extended(driver); end1474 def self.w3c?(driver); end1475end1476module Capybara::Selenium::Driver::W3CFirefoxDriver1477 def browser_version; end1478 def build_node(native_node, initial_cache = nil); end1479 def refresh; end1480 def reset!; end1481 def resize_window_to(handle, width, height); end1482 def self.extended(driver); end1483 def self.pause_broken?(sel_driver); end1484 def switch_to_frame(frame); end1485end1486class Capybara::Selenium::IENode < Capybara::Selenium::Node1487 def disabled?; end1488end1489module Capybara::Selenium::Driver::InternetExplorerDriver1490 def build_node(native_node, initial_cache = nil); end1491 def switch_to_frame(frame); end1492end1493class Capybara::Selenium::Node::ModifierKeysStack1494 def include?(key); end1495 def initialize; end1496 def pop; end1497 def press(key); end1498 def push; end1499end1500class Capybara::Selenium::SafariNode < Capybara::Selenium::Node1501 def _send_keys(keys, actions = nil, down_keys = nil); end1502 def click(keys = nil, **options); end1503 def disabled?; end1504 def hover; end1505 def select_option; end1506 def send_keys(*args); end1507 def set_file(value); end1508 def set_text(value, clear: nil, **_unused); end1509 def unselect_option; end1510 def visible_text; end1511end1512module Capybara::Selenium::Driver::SafariDriver1513 def build_node(native_node, initial_cache = nil); end1514 def switch_to_frame(frame); end1515end1516class Capybara::Selenium::EdgeNode < Capybara::Selenium::Node1517 def browser_version; end1518 def chrome_edge?; end1519 def click(*arg0); end1520 def disabled?; end1521 def drop(*args); end1522 def file_errors; end1523 def native_displayed?; end1524 def select_option; end1525 def set_file(value); end1526 def set_text(value, clear: nil, **_unused); end1527 def visible?; end1528 include Capybara::Selenium::Node::Html5Drag1529end1530module Capybara::Selenium::Driver::EdgeDriver1531 def build_node(native_node, initial_cache = nil); end1532 def cdp_unsupported_errors; end1533 def clear_all_storage?; end1534 def clear_storage; end1535 def delete_all_cookies; end1536 def download_path=(path); end1537 def edgedriver_version; end1538 def execute_cdp(cmd, params = nil); end1539 def fullscreen_window(handle); end1540 def reset!; end1541 def resize_window_to(handle, width, height); end1542 def self.extended(base); end1543 def storage_clears; end1544 def storage_types_to_clear; end1545 def uniform_storage_clear?; end1546end1547class Capybara::Selenium::Driver < Capybara::Driver::Base1548 def accept_modal(_type, **options); end1549 def accept_unhandled_reset_alert; end1550 def active_element; end1551 def app; end1552 def bridge; end1553 def browser; end1554 def build_node(native_node, initial_cache = nil); end1555 def clear_browser_state; end1556 def clear_browser_state_errors; end1557 def clear_local_storage; end1558 def clear_session_storage; end1559 def clear_storage; end1560 def close_window(handle); end1561 def current_url; end1562 def current_window_handle; end1563 def delete_all_cookies; end1564 def dismiss_modal(_type, **options); end1565 def evaluate_async_script(script, *args); end1566 def evaluate_script(script, *args); end1567 def execute_script(script, *args); end1568 def find_context; end1569 def find_modal(text: nil, **options); end1570 def find_modal_errors; end1571 def frame_obscured_at?(x:, y:); end1572 def fullscreen_window(handle); end1573 def go_back; end1574 def go_forward; end1575 def html; end1576 def initialize(app, **options); end1577 def invalid_element_errors; end1578 def maximize_window(handle); end1579 def modal_error; end1580 def native_args(args); end1581 def navigate_with_accept(url); end1582 def needs_server?; end1583 def no_such_window_error; end1584 def open_new_window(kind = nil); end1585 def options; end1586 def quit; end1587 def refresh; end1588 def reset!; end1589 def reset_browser_state; end1590 def resize_window_to(handle, width, height); end1591 def save_screenshot(path, **_options); end1592 def selenium_4?; end1593 def self.load_selenium; end1594 def self.register_specialization(browser_name, specialization); end1595 def self.selenium_webdriver_version; end1596 def self.specializations; end1597 def send_keys(*args); end1598 def setup_exit_handler; end1599 def silenced_unknown_error_message?(msg); end1600 def silenced_unknown_error_messages; end1601 def specialize_driver; end1602 def switch_to_frame(frame); end1603 def switch_to_window(handle); end1604 def title; end1605 def unhandled_alert_errors; end1606 def unwrap_script_result(arg); end1607 def visit(path); end1608 def wait?; end1609 def wait_for_empty_page(timer); end1610 def window_handles; end1611 def window_size(handle); end1612 def with_legacy_error(errors, legacy_error); end1613 def within_given_window(handle); end1614 include Capybara::Selenium::Find1615end1616class Capybara::CapybaraError < StandardError1617end1618class Capybara::DriverNotFoundError < Capybara::CapybaraError1619end1620class Capybara::FrozenInTime < Capybara::CapybaraError1621end1622class Capybara::ElementNotFound < Capybara::CapybaraError1623end1624class Capybara::ModalNotFound < Capybara::CapybaraError1625end1626class Capybara::Ambiguous < Capybara::ElementNotFound1627end1628class Capybara::ExpectationNotMet < Capybara::ElementNotFound1629end1630class Capybara::FileNotFound < Capybara::CapybaraError1631end1632class Capybara::UnselectNotAllowed < Capybara::CapybaraError1633end1634class Capybara::NotSupportedByDriverError < Capybara::CapybaraError1635end1636class Capybara::InfiniteRedirectError < Capybara::CapybaraError1637end1638class Capybara::ScopeError < Capybara::CapybaraError1639end1640class Capybara::WindowError < Capybara::CapybaraError1641end1642class Capybara::ReadOnlyElementError < Capybara::CapybaraError1643end1644module Capybara::RackTest1645end1646module Capybara::DSL1647 def accept_alert(**, &&); end1648 def accept_confirm(**, &&); end1649 def accept_prompt(**, &&); end1650 def all(**, &&); end1651 def assert_all_of_selectors(**, &&); end1652 def assert_any_of_selectors(**, &&); end1653 def assert_current_path(**, &&); end1654 def assert_no_current_path(**, &&); end1655 def assert_no_selector(**, &&); end1656 def assert_no_text(**, &&); end1657 def assert_no_title(**, &&); end1658 def assert_none_of_selectors(**, &&); end1659 def assert_selector(**, &&); end1660 def assert_text(**, &&); end1661 def assert_title(**, &&); end1662 def attach_file(**, &&); end1663 def body(**, &&); end1664 def check(**, &&); end1665 def choose(**, &&); end1666 def click_button(**, &&); end1667 def click_link(**, &&); end1668 def click_link_or_button(**, &&); end1669 def click_on(**, &&); end1670 def current_host(**, &&); end1671 def current_path(**, &&); end1672 def current_scope(**, &&); end1673 def current_url(**, &&); end1674 def current_window(**, &&); end1675 def dismiss_confirm(**, &&); end1676 def dismiss_prompt(**, &&); end1677 def evaluate_script(**, &&); end1678 def execute_script(**, &&); end1679 def fill_in(**, &&); end1680 def find(**, &&); end1681 def find_all(**, &&); end1682 def find_button(**, &&); end1683 def find_by_id(**, &&); end1684 def find_field(**, &&); end1685 def find_link(**, &&); end1686 def first(**, &&); end1687 def go_back(**, &&); end1688 def go_forward(**, &&); end1689 def has_button?(**, &&); end1690 def has_checked_field?(**, &&); end1691 def has_content?(**, &&); end1692 def has_css?(**, &&); end1693 def has_current_path?(**, &&); end1694 def has_field?(**, &&); end1695 def has_link?(**, &&); end1696 def has_no_button?(**, &&); end1697 def has_no_checked_field?(**, &&); end1698 def has_no_content?(**, &&); end1699 def has_no_css?(**, &&); end1700 def has_no_current_path?(**, &&); end1701 def has_no_field?(**, &&); end1702 def has_no_link?(**, &&); end1703 def has_no_select?(**, &&); end1704 def has_no_selector?(**, &&); end1705 def has_no_table?(**, &&); end1706 def has_no_text?(**, &&); end1707 def has_no_title?(**, &&); end1708 def has_no_unchecked_field?(**, &&); end1709 def has_no_xpath?(**, &&); end1710 def has_select?(**, &&); end1711 def has_selector?(**, &&); end1712 def has_table?(**, &&); end1713 def has_text?(**, &&); end1714 def has_title?(**, &&); end1715 def has_unchecked_field?(**, &&); end1716 def has_xpath?(**, &&); end1717 def html(**, &&); end1718 def open_new_window(**, &&); end1719 def page; end1720 def query(**, &&); end1721 def refresh(**, &&); end1722 def refute_selector(**, &&); end1723 def reset_session!(**, &&); end1724 def response_headers(**, &&); end1725 def save_and_open_page(**, &&); end1726 def save_and_open_screenshot(**, &&); end1727 def save_page(**, &&); end1728 def save_screenshot(**, &&); end1729 def scroll_by(**, &&); end1730 def scroll_to(**, &&); end1731 def select(**, &&); end1732 def self.extended(base); end1733 def self.included(base); end1734 def send_keys(**, &&); end1735 def source(**, &&); end1736 def status_code(**, &&); end1737 def switch_to_frame(**, &&); end1738 def switch_to_window(**, &&); end1739 def text(**, &&); end1740 def title(**, &&); end1741 def uncheck(**, &&); end1742 def unselect(**, &&); end1743 def using_session(name_or_session, &block); end1744 def using_wait_time(seconds, &block); end1745 def visit(**, &&); end1746 def window_opened_by(**, &&); end1747 def windows(**, &&); end1748 def within(**, &&); end1749 def within_element(**, &&); end1750 def within_fieldset(**, &&); end1751 def within_frame(**, &&); end1752 def within_table(**, &&); end1753 def within_window(**, &&); end1754end1755module Capybara::RSpecMatchers1756 def become_closed(**options); end1757 def have_all_of_selectors(*args, **kw_args, &optional_filter_block); end1758 def have_ancestor(*args, **kw_args, &optional_filter_block); end1759 def have_any_of_selectors(*args, **kw_args, &optional_filter_block); end1760 def have_button(locator = nil, **options, &optional_filter_block); end1761 def have_checked_field(locator = nil, **options, &optional_filter_block); end1762 def have_content(text_or_type, *args, **options); end1763 def have_css(expr, **options, &optional_filter_block); end1764 def have_current_path(path, **options, &optional_filter_block); end1765 def have_field(locator = nil, **options, &optional_filter_block); end1766 def have_link(locator = nil, **options, &optional_filter_block); end1767 def have_no_ancestor(*args, **kw_args, &optional_filter_block); end1768 def have_no_button(*args, **kw_args, &optional_filter_block); end1769 def have_no_checked_field(*args, **kw_args, &optional_filter_block); end1770 def have_no_content(*args, **kw_args, &optional_filter_block); end1771 def have_no_css(*args, **kw_args, &optional_filter_block); end1772 def have_no_current_path(*args, **kw_args, &optional_filter_block); end1773 def have_no_field(*args, **kw_args, &optional_filter_block); end1774 def have_no_link(*args, **kw_args, &optional_filter_block); end1775 def have_no_select(*args, **kw_args, &optional_filter_block); end1776 def have_no_selector(*args, **kw_args, &optional_filter_block); end1777 def have_no_sibling(*args, **kw_args, &optional_filter_block); end1778 def have_no_table(*args, **kw_args, &optional_filter_block); end1779 def have_no_text(*args, **kw_args, &optional_filter_block); end1780 def have_no_title(*args, **kw_args, &optional_filter_block); end1781 def have_no_unchecked_field(*args, **kw_args, &optional_filter_block); end1782 def have_no_xpath(*args, **kw_args, &optional_filter_block); end1783 def have_none_of_selectors(*args, **kw_args, &optional_filter_block); end1784 def have_select(locator = nil, **options, &optional_filter_block); end1785 def have_selector(*args, **kw_args, &optional_filter_block); end1786 def have_sibling(*args, **kw_args, &optional_filter_block); end1787 def have_style(styles = nil, **options); end1788 def have_table(locator = nil, **options, &optional_filter_block); end1789 def have_text(text_or_type, *args, **options); end1790 def have_title(title, **options); end1791 def have_unchecked_field(locator = nil, **options, &optional_filter_block); end1792 def have_xpath(expr, **options, &optional_filter_block); end1793 def match_css(expr, **options, &optional_filter_block); end1794 def match_selector(*args, **kw_args, &optional_filter_block); end1795 def match_style(styles = nil, **options); end1796 def match_xpath(expr, **options, &optional_filter_block); end1797 def not_match_css(*args, **kw_args, &optional_filter_block); end1798 def not_match_selector(*args, **kw_args, &optional_filter_block); end1799 def not_match_xpath(*args, **kw_args, &optional_filter_block); end1800end1801module Capybara::RSpecMatchers::Matchers1802end1803module Capybara::RSpecMatchers::Matchers::Compound1804 def and(matcher); end1805 def and_then(matcher); end1806 def or(matcher); end1807 include RSpec::Matchers::Composable1808end1809class Capybara::RSpecMatchers::Matchers::Compound::CapybaraEvaluator1810 def initialize(actual); end1811 def matcher_matches?(matcher); end1812 def reset; end1813end1814module Capybara::RSpecMatchers::Matchers::Compound::Synchronizer1815 def match(_expected, actual); end1816 def sync_element(el); end1817end1818class Capybara::RSpecMatchers::Matchers::Compound::And < RSpec::Matchers::BuiltIn::Compound::And1819 def synchronized_match?; end1820 include Capybara::RSpecMatchers::Matchers::Compound::Synchronizer1821end1822class Capybara::RSpecMatchers::Matchers::Compound::Or < RSpec::Matchers::BuiltIn::Compound::Or1823 def synchronized_match?; end1824 include Capybara::RSpecMatchers::Matchers::Compound::Synchronizer1825end1826module Capybara::RSpecMatchers::CountSugar1827 def at_least(number); end1828 def at_most(number); end1829 def exactly(number); end1830 def once; end1831 def options; end1832 def thrice; end1833 def times; end1834 def twice; end1835end1836module Capybara::RSpecMatchers::SpatialSugar1837 def above(el); end1838 def below(el); end1839 def left_of(el); end1840 def near(el); end1841 def options; end1842 def right_of(el); end1843end1844class Capybara::RSpecMatchers::Matchers::Base1845 def failure_message; end1846 def failure_message_when_negated; end1847 def initialize(*args, **kw_args, &filter_block); end1848 def session_options; end1849 def session_query_args; end1850 def session_query_options; end1851 include Capybara::RSpecMatchers::Matchers::Compound1852end1853class Capybara::RSpecMatchers::Matchers::WrappedElementMatcher < Capybara::RSpecMatchers::Matchers::Base1854 def does_not_match?(actual); end1855 def matches?(actual); end1856 def wrap(actual); end1857end1858class Capybara::RSpecMatchers::Matchers::CountableWrappedElementMatcher < Capybara::RSpecMatchers::Matchers::WrappedElementMatcher1859 include Capybara::RSpecMatchers::CountSugar1860 include Capybara::RSpecMatchers::SpatialSugar1861end1862class Capybara::RSpecMatchers::Matchers::NegatedMatcher1863 def description; end1864 def does_not_match?(actual); end1865 def failure_message; end1866 def failure_message_when_negated; end1867 def initialize(matcher); end1868 def matches?(actual); end1869 include Capybara::RSpecMatchers::Matchers::Compound1870end1871class Capybara::RSpecMatchers::Matchers::HaveSelector < Capybara::RSpecMatchers::Matchers::CountableWrappedElementMatcher1872 def description; end1873 def element_does_not_match?(el); end1874 def element_matches?(el); end1875 def initialize(*args, **kw_args, &filter_block); end1876 def query; end1877end1878class Capybara::RSpecMatchers::Matchers::HaveAllSelectors < Capybara::RSpecMatchers::Matchers::WrappedElementMatcher1879 def description; end1880 def does_not_match?(_actual); end1881 def element_matches?(el); end1882end1883class Capybara::RSpecMatchers::Matchers::HaveNoSelectors < Capybara::RSpecMatchers::Matchers::WrappedElementMatcher1884 def description; end1885 def does_not_match?(_actual); end1886 def element_matches?(el); end1887end1888class Capybara::RSpecMatchers::Matchers::HaveAnySelectors < Capybara::RSpecMatchers::Matchers::WrappedElementMatcher1889 def description; end1890 def does_not_match?(_actual); end1891 def element_matches?(el); end1892end1893class Capybara::RSpecMatchers::Matchers::HaveAncestor < Capybara::RSpecMatchers::Matchers::CountableWrappedElementMatcher1894 def description; end1895 def element_does_not_match?(el); end1896 def element_matches?(el); end1897 def query; end1898end1899class Capybara::RSpecMatchers::Matchers::HaveSibling < Capybara::RSpecMatchers::Matchers::CountableWrappedElementMatcher1900 def description; end1901 def element_does_not_match?(el); end1902 def element_matches?(el); end1903 def query; end1904end1905class Capybara::RSpecMatchers::Matchers::MatchSelector < Capybara::RSpecMatchers::Matchers::HaveSelector1906 def description; end1907 def element_does_not_match?(el); end1908 def element_matches?(el); end1909 def query; end1910end1911class Capybara::RSpecMatchers::Matchers::HaveCurrentPath < Capybara::RSpecMatchers::Matchers::WrappedElementMatcher1912 def current_path; end1913 def description; end1914 def element_does_not_match?(el); end1915 def element_matches?(el); end1916end1917class Capybara::RSpecMatchers::Matchers::MatchStyle < Capybara::RSpecMatchers::Matchers::WrappedElementMatcher1918 def description; end1919 def does_not_match?(_actual); end1920 def element_matches?(el); end1921 def initialize(styles = nil, **kw_args, &filter_block); end1922end1923class Capybara::RSpecMatchers::Matchers::HaveStyle < Capybara::RSpecMatchers::Matchers::MatchStyle1924 def initialize(*args, **kw_args, &filter_block); end1925end1926class Capybara::RSpecMatchers::Matchers::HaveText < Capybara::RSpecMatchers::Matchers::CountableWrappedElementMatcher1927 def description; end1928 def element_does_not_match?(el); end1929 def element_matches?(el); end1930 def format(content); end1931 def text; end1932end1933class Capybara::RSpecMatchers::Matchers::HaveTitle < Capybara::RSpecMatchers::Matchers::WrappedElementMatcher1934 def description; end1935 def element_does_not_match?(el); end1936 def element_matches?(el); end1937 def title; end1938end1939class Capybara::RSpecMatchers::Matchers::BecomeClosed1940 def failure_message; end1941 def failure_message_when_negated; end1942 def initialize(options); end1943 def matches?(window); end1944end1945class RSpec::Core::ExampleGroup1946 def self.ffeature(*args, &example_group_block); end1947 def self.fscenario(*all_args, &block); end1948 def self.xfeature(*args, &example_group_block); end1949end1950module RSpec1951 def self.ffeature(*args, &example_group_block); end1952 def self.xfeature(*args, &example_group_block); end1953end1954class Module1955 def ffeature(*a, &b); end1956 def xfeature(*a, &b); end1957end1958module Capybara::RSpecMatcherProxies1959 def all(*args, **kwargs, &block); end1960 def within(*args, **kwargs, &block); end1961end1962module Capybara::DSLRSpecProxyInstaller1963 def self.prepended(base); end1964end1965module Capybara::DSLRSpecProxyInstaller::ClassMethods1966 def included(base); end1967end1968module Capybara::RSpecMatcherProxyInstaller1969 def self.prepended(base); end1970end1971module Capybara::RSpecMatcherProxyInstaller::ClassMethods1972 def included(base); end1973end1974class RSpec::ExampleGroups::GamesAdmin < RSpec::Core::ExampleGroup1975 include Capybara::DSL1976 include Capybara::RSpecMatcherProxies1977 include Capybara::RSpecMatchers1978end1979class RSpec::ExampleGroups::ThePredictionProcess < RSpec::Core::ExampleGroup1980 include Capybara::DSL1981 include Capybara::RSpecMatcherProxies1982 include Capybara::RSpecMatchers1983end1984class RSpec::ExampleGroups::TeamsAdmin < RSpec::Core::ExampleGroup1985 include Capybara::DSL1986 include Capybara::RSpecMatcherProxies1987 include Capybara::RSpecMatchers1988end1989class RSpec::ExampleGroups::GamesEdit < RSpec::Core::ExampleGroup1990 include Capybara::RSpecMatchers1991end1992class RSpec::ExampleGroups::GamesIndex < RSpec::Core::ExampleGroup1993 include Capybara::RSpecMatchers1994end1995class RSpec::ExampleGroups::GamesNew < RSpec::Core::ExampleGroup1996 include Capybara::RSpecMatchers1997end1998class RSpec::ExampleGroups::GamesShow < RSpec::Core::ExampleGroup1999 include Capybara::RSpecMatchers2000end2001class RSpec::ExampleGroups::TeamsEdit < RSpec::Core::ExampleGroup2002 include Capybara::RSpecMatchers2003end2004class RSpec::ExampleGroups::TeamsIndex < RSpec::Core::ExampleGroup2005 include Capybara::RSpecMatchers2006end2007class RSpec::ExampleGroups::TeamsNew < RSpec::Core::ExampleGroup2008 include Capybara::RSpecMatchers2009end2010class RSpec::ExampleGroups::TeamsShow < RSpec::Core::ExampleGroup2011 include Capybara::RSpecMatchers2012end2013class RSpec::ExampleGroups::WelcomeIndexHtmlSlim < RSpec::Core::ExampleGroup2014 include Capybara::RSpecMatchers2015end2016module Capybara::Minitest2017end2018module Capybara::Minitest::Assertions2019 def assert_all_of_selectors(*args, &optional_filter_block); end2020 def assert_ancestor(*args, &optional_filter_block); end2021 def assert_any_of_selectors(*args, &optional_filter_block); end2022 def assert_button(*args, &optional_filter_block); end2023 def assert_checked_field(*args, &optional_filter_block); end2024 def assert_content(*args, **kwargs, &optional_filter_block); end2025 def assert_css(*args, &optional_filter_block); end2026 def assert_current_path(*args, **kwargs, &optional_filter_block); end2027 def assert_field(*args, &optional_filter_block); end2028 def assert_link(*args, &optional_filter_block); end2029 def assert_matches_css(*args, &optional_filter_block); end2030 def assert_matches_selector(*args, &optional_filter_block); end2031 def assert_matches_style(*args, &optional_filter_block); end2032 def assert_matches_xpath(*args, &optional_filter_block); end2033 def assert_no_ancestor(*args, &optional_filter_block); end2034 def assert_no_button(*args, &optional_filter_block); end2035 def assert_no_checked_field(*args, &optional_filter_block); end2036 def assert_no_content(*args, **kwargs, &optional_filter_block); end2037 def assert_no_css(*args, &optional_filter_block); end2038 def assert_no_current_path(*args, **kwargs, &optional_filter_block); end2039 def assert_no_field(*args, &optional_filter_block); end2040 def assert_no_link(*args, &optional_filter_block); end2041 def assert_no_select(*args, &optional_filter_block); end2042 def assert_no_selector(*args, &optional_filter_block); end2043 def assert_no_sibling(*args, &optional_filter_block); end2044 def assert_no_table(*args, &optional_filter_block); end2045 def assert_no_text(*args, **kwargs, &optional_filter_block); end2046 def assert_no_title(*args, **kwargs, &optional_filter_block); end2047 def assert_no_unchecked_field(*args, &optional_filter_block); end2048 def assert_no_xpath(*args, &optional_filter_block); end2049 def assert_none_of_selectors(*args, &optional_filter_block); end2050 def assert_not_matches_css(*args, &optional_filter_block); end2051 def assert_not_matches_selector(*args, &optional_filter_block); end2052 def assert_not_matches_xpath(*args, &optional_filter_block); end2053 def assert_select(*args, &optional_filter_block); end2054 def assert_selector(*args, &optional_filter_block); end2055 def assert_sibling(*args, &optional_filter_block); end2056 def assert_table(*args, &optional_filter_block); end2057 def assert_text(*args, **kwargs, &optional_filter_block); end2058 def assert_title(*args, **kwargs, &optional_filter_block); end2059 def assert_unchecked_field(*args, &optional_filter_block); end2060 def assert_xpath(*args, &optional_filter_block); end2061 def determine_subject(args); end2062 def extract_locator(args); end2063 def refute_ancestor(*args, &optional_filter_block); end2064 def refute_button(*args, &optional_filter_block); end2065 def refute_checked_field(*args, &optional_filter_block); end2066 def refute_content(*args, **kwargs, &optional_filter_block); end2067 def refute_css(*args, &optional_filter_block); end2068 def refute_current_path(*args, **kwargs, &optional_filter_block); end2069 def refute_field(*args, &optional_filter_block); end2070 def refute_link(*args, &optional_filter_block); end2071 def refute_matches_css(*args, &optional_filter_block); end2072 def refute_matches_selector(*args, &optional_filter_block); end2073 def refute_matches_xpath(*args, &optional_filter_block); end2074 def refute_select(*args, &optional_filter_block); end2075 def refute_selector(*args, &optional_filter_block); end2076 def refute_sibling(*args, &optional_filter_block); end2077 def refute_table(*args, &optional_filter_block); end2078 def refute_text(*args, **kwargs, &optional_filter_block); end2079 def refute_title(*args, **kwargs, &optional_filter_block); end2080 def refute_unchecked_field(*args, &optional_filter_block); end2081 def refute_xpath(*args, &optional_filter_block); end2082end...
matchers.rb
Source:matchers.rb
...10 @filter_block = filter_block11 end12 def wrap(actual)13 actual = actual.to_capybara_node if actual.respond_to?(:to_capybara_node)14 @context_el = if actual.respond_to?(:has_selector?)15 actual16 else17 Capybara.string(actual.to_s)18 end19 end20 private21 def session_query_args22 if @args.last.is_a? Hash23 @args.last[:session_options] = session_options24 else25 @args.push(session_options: session_options)26 end27 @args28 end29 def session_options30 @context_el ||= nil31 if @context_el.respond_to? :session_options32 @context_el.session_options33 elsif @context_el.respond_to? :current_scope34 @context_el.current_scope.session_options35 else36 Capybara.session_options37 end38 end39 end40 class WrappedElementMatcher < Matcher41 def matches?(actual)42 element_matches?(wrap(actual))43 rescue Capybara::ExpectationNotMet => err44 @failure_message = err.message45 false46 end47 def does_not_match?(actual)48 element_does_not_match?(wrap(actual))49 rescue Capybara::ExpectationNotMet => err50 @failure_message_when_negated = err.message51 false52 end53 end54 class HaveSelector < WrappedElementMatcher55 def element_matches?(el)56 el.assert_selector(*@args, &@filter_block)57 end58 def element_does_not_match?(el)59 el.assert_no_selector(*@args, &@filter_block)60 end61 def description62 "have #{query.description}"63 end64 def query65 @query ||= Capybara::Queries::SelectorQuery.new(*session_query_args, &@filter_block)66 end67 end68 class HaveAllSelectors < WrappedElementMatcher69 def element_matches?(el)70 el.assert_all_of_selectors(*@args, &@filter_block)71 end72 def does_not_match?(_actual)73 raise ArgumentError, 'The have_all_selectors matcher does not support use with not_to/should_not'74 end75 def description76 'have all selectors'77 end78 end79 class HaveNoSelectors < WrappedElementMatcher80 def element_matches?(el)81 el.assert_none_of_selectors(*@args, &@filter_block)82 end83 def does_not_match?(_actual)84 raise ArgumentError, 'The have_none_of_selectors matcher does not support use with not_to/should_not'85 end86 def description87 'have no selectors'88 end89 end90 class HaveAnySelectors < WrappedElementMatcher91 def element_matches?(el)92 el.assert_any_of_selectors(*@args, &@filter_block)93 end94 def does_not_match?(_actual)95 el.assert_none_of_selectors(*@args, &@filter_block)96 end97 def description98 'have any selectors'99 end100 end101 class MatchSelector < HaveSelector102 def element_matches?(el)103 el.assert_matches_selector(*@args, &@filter_block)104 end105 def element_does_not_match?(el)106 el.assert_not_matches_selector(*@args, &@filter_block)107 end108 def description109 "match #{query.description}"110 end111 def query112 @query ||= Capybara::Queries::MatchQuery.new(*session_query_args, &@filter_block)113 end114 end115 class HaveText < WrappedElementMatcher116 def element_matches?(el)117 el.assert_text(*@args)118 end119 def element_does_not_match?(el)120 el.assert_no_text(*@args)121 end122 def description123 "text #{format(text)}"124 end125 def format(content)126 content.inspect127 end128 private129 def text130 @args[0].is_a?(Symbol) ? @args[1] : @args[0]131 end132 end133 class HaveTitle < WrappedElementMatcher134 def element_matches?(el)135 el.assert_title(*@args)136 end137 def element_does_not_match?(el)138 el.assert_no_title(*@args)139 end140 def description141 "have title #{title.inspect}"142 end143 private144 def title145 @args.first146 end147 end148 class HaveCurrentPath < WrappedElementMatcher149 def element_matches?(el)150 el.assert_current_path(*@args)151 end152 def element_does_not_match?(el)153 el.assert_no_current_path(*@args)154 end155 def description156 "have current path #{current_path.inspect}"157 end158 private159 def current_path160 @args.first161 end162 end163 class NegatedMatcher164 include ::Capybara::RSpecMatchers::Compound if defined?(::Capybara::RSpecMatchers::Compound)165 def initialize(matcher)166 super()167 @matcher = matcher168 end169 def matches?(actual)170 @matcher.does_not_match?(actual)171 end172 def does_not_match?(actual)173 @matcher.matches?(actual)174 end175 def description176 "not #{@matcher.description}"177 end178 def failure_message179 @matcher.failure_message_when_negated180 end181 def failure_message_when_negated182 @matcher.failure_message183 end184 end185 class HaveStyle < WrappedElementMatcher186 def element_matches?(el)187 el.assert_style(*@args)188 end189 def does_not_match?(_actual)190 raise ArgumentError, 'The have_style matcher does not support use with not_to/should_not'191 end192 def description193 'have style'194 end195 end196 class BecomeClosed197 def initialize(options)198 @options = options199 end200 def matches?(window)201 @window = window202 @wait_time = Capybara::Queries::BaseQuery.wait(@options, window.session.config.default_max_wait_time)203 timer = Capybara::Helpers.timer(expire_in: @wait_time)204 while window.exists?205 return false if timer.expired?206 sleep 0.05207 end208 true209 end210 def failure_message211 "expected #{@window.inspect} to become closed after #{@wait_time} seconds"212 end213 def failure_message_when_negated214 "expected #{@window.inspect} not to become closed after #{@wait_time} seconds"215 end216 end217 # RSpec matcher for whether the element(s) matching a given selector exist218 # See {Capybara::Node::Matcher#assert_selector}219 def have_selector(*args, &optional_filter_block)220 HaveSelector.new(*args, &optional_filter_block)221 end222 # RSpec matcher for whether the element(s) matching a group of selectors exist223 # See {Capybara::Node::Matcher#assert_all_of_selectors}224 def have_all_of_selectors(*args, &optional_filter_block)225 HaveAllSelectors.new(*args, &optional_filter_block)226 end227 # RSpec matcher for whether no element(s) matching a group of selectors exist228 # See {Capybara::Node::Matcher#assert_none_of_selectors}229 def have_none_of_selectors(*args, &optional_filter_block)230 HaveNoSelectors.new(*args, &optional_filter_block)231 end232 # RSpec matcher for whether the element(s) matching any of a group of selectors exist233 # See {Capybara::Node::Matcher#assert_any_of_selectors}234 def have_any_of_selectors(*args, &optional_filter_block)235 HaveAnySelectors.new(*args, &optional_filter_block)236 end237 # RSpec matcher for whether the current element matches a given selector238 # See {Capybara::Node::Matchers#assert_matches_selector}239 def match_selector(*args, &optional_filter_block)240 MatchSelector.new(*args, &optional_filter_block)241 end242 %i[css xpath].each do |selector|243 define_method "have_#{selector}" do |expr, **options, &optional_filter_block|244 HaveSelector.new(selector, expr, options, &optional_filter_block)245 end246 define_method "match_#{selector}" do |expr, **options, &optional_filter_block|247 MatchSelector.new(selector, expr, options, &optional_filter_block)248 end249 end250 # @!method have_xpath(xpath, **options, &optional_filter_block)251 # RSpec matcher for whether elements(s) matching a given xpath selector exist252 # See {Capybara::Node::Matchers#has_xpath?}253 # @!method have_css(css, **options, &optional_filter_block)254 # RSpec matcher for whether elements(s) matching a given css selector exist255 # See {Capybara::Node::Matchers#has_css?}256 # @!method match_xpath(xpath, **options, &optional_filter_block)257 # RSpec matcher for whether the current element matches a given xpath selector258 # See {Capybara::Node::Matchers#matches_xpath?}259 # @!method match_css(css, **options, &optional_filter_block)260 # RSpec matcher for whether the current element matches a given css selector261 # See {Capybara::Node::Matchers#matches_css?}262 %i[link button field select table].each do |selector|263 define_method "have_#{selector}" do |locator = nil, **options, &optional_filter_block|264 HaveSelector.new(selector, locator, options, &optional_filter_block)265 end266 end267 # @!method have_link(locator = nil, **options, &optional_filter_block)268 # RSpec matcher for links269 # See {Capybara::Node::Matchers#has_link?}270 # @!method have_button(locator = nil, **options, &optional_filter_block)271 # RSpec matcher for buttons272 # See {Capybara::Node::Matchers#has_button?}273 # @!method have_field(locator = nil, **options, &optional_filter_block)274 # RSpec matcher for links275 # See {Capybara::Node::Matchers#has_field?}276 # @!method have_select(locator = nil, **options, &optional_filter_block)277 # RSpec matcher for select elements278 # See {Capybara::Node::Matchers#has_select?}279 # @!method have_table(locator = nil, **options, &optional_filter_block)280 # RSpec matcher for table elements281 # See {Capybara::Node::Matchers#has_table?}282 %i[checked unchecked].each do |state|283 define_method "have_#{state}_field" do |locator = nil, **options, &optional_filter_block|284 HaveSelector.new(:field, locator, options.merge(state => true), &optional_filter_block)285 end286 end287 # @!method have_checked_field(locator = nil, **options, &optional_filter_block)288 # RSpec matcher for checked fields289 # See {Capybara::Node::Matchers#has_checked_field?}290 # @!method have_unchecked_field(locator = nil, **options, &optional_filter_block)291 # RSpec matcher for unchecked fields292 # See {Capybara::Node::Matchers#has_unchecked_field?}293 # RSpec matcher for text content294 # See {Capybara::SessionMatchers#assert_text}295 def have_text(*args)296 HaveText.new(*args)297 end298 alias_method :have_content, :have_text299 def have_title(title, **options)300 HaveTitle.new(title, options)301 end302 # RSpec matcher for the current path303 # See {Capybara::SessionMatchers#assert_current_path}304 def have_current_path(path, **options)305 HaveCurrentPath.new(path, options)306 end307 # RSpec matcher for element style308 # See {Capybara::Node::Matchers#has_style?}309 def have_style(styles, **options)310 HaveStyle.new(styles, options)311 end312 %w[selector css xpath text title current_path link button field checked_field unchecked_field select table].each do |matcher_type|313 define_method "have_no_#{matcher_type}" do |*args, &optional_filter_block|314 NegatedMatcher.new(send("have_#{matcher_type}", *args, &optional_filter_block))315 end316 end317 alias_method :have_no_content, :have_no_text318 %w[selector css xpath].each do |matcher_type|319 define_method "not_match_#{matcher_type}" do |*args, &optional_filter_block|320 NegatedMatcher.new(send("match_#{matcher_type}", *args, &optional_filter_block))321 end322 end323 ##324 # Wait for window to become closed.325 # @example326 # expect(window).to become_closed(wait: 0.8)327 # @param options [Hash] optional param328 # @option options [Numeric] :wait (Capybara.default_max_wait_time) Maximum wait time329 def become_closed(**options)330 BecomeClosed.new(options)331 end...
text
Using AI Code Generation
1 page.should have_content('Hello World')2 page.should have_text('Hello World')3 page.should have_xpath('//h1', :text => 'Hello World')4 page.should have_xpath('//h1', :text => 'Hello World')5 page.should have_xpath('//h1', :text => 'Hello World')
text
Using AI Code Generation
1 page.should have_content('Google')2 page.should have_selector(:xpath, "//h1[text()='Google']")3 page.should have_xpath("//h1[text()='Google']")4 page.should have_css("h1", :text => 'Google')51 scenario (1 passed)63 steps (3 passed)71 scenario (1 passed)83 steps (3 passed)91 scenario (1 passed)103 steps (3 passed)
text
Using AI Code Generation
1 page.should have_text("Hello")2 page.should have_text("Hello")3 page.should have_text("Hello")4 page.should have_text("Hello")5 page.should have_text("Hello")6 page.should have_text("Hello")7 page.should have_text("Hello")
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!