Full Code of teamcapybara/capybara for AI

master b3325b198464 cached
342 files
1.7 MB
476.0k tokens
1728 symbols
1 requests
Download .txt
Showing preview only (1,795K chars total). Download the full file or copy to clipboard to get everything.
Repository: teamcapybara/capybara
Branch: master
Commit: b3325b198464
Files: 342
Total size: 1.7 MB

Directory structure:
gitextract_qjm4xzrk/

├── .codeclimate.yml
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE.md
│   ├── dependabot.yml
│   ├── lock.yml
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .rspec
├── .rubocop.yml
├── .yardopts
├── CONTRIBUTING.md
├── Gemfile
├── History.md
├── License.txt
├── README.md
├── Rakefile
├── UPGRADING.md
├── appveyor.yml.outdated
├── capybara.gemspec
├── docker-compose.yml
├── features/
│   ├── capybara.feature
│   ├── named_driver_feature.feature
│   ├── step_definitions/
│   │   └── capybara_steps.rb
│   └── support/
│       └── env.rb
├── gem-public_cert.pem
├── gemfiles/
│   ├── Gemfile.base-versions
│   ├── Gemfile.beta-versions
│   ├── Gemfile.chrome_edge
│   ├── Gemfile.edge-firefox
│   ├── Gemfile.ie
│   ├── Gemfile.rack2
│   └── Gemfile.rack3
├── lib/
│   ├── capybara/
│   │   ├── config.rb
│   │   ├── cucumber.rb
│   │   ├── driver/
│   │   │   ├── base.rb
│   │   │   └── node.rb
│   │   ├── dsl.rb
│   │   ├── helpers.rb
│   │   ├── minitest/
│   │   │   └── spec.rb
│   │   ├── minitest.rb
│   │   ├── node/
│   │   │   ├── actions.rb
│   │   │   ├── base.rb
│   │   │   ├── document.rb
│   │   │   ├── document_matchers.rb
│   │   │   ├── element.rb
│   │   │   ├── finders.rb
│   │   │   ├── matchers.rb
│   │   │   ├── simple.rb
│   │   │   └── whitespace_normalizer.rb
│   │   ├── queries/
│   │   │   ├── active_element_query.rb
│   │   │   ├── ancestor_query.rb
│   │   │   ├── base_query.rb
│   │   │   ├── current_path_query.rb
│   │   │   ├── match_query.rb
│   │   │   ├── selector_query.rb
│   │   │   ├── sibling_query.rb
│   │   │   ├── style_query.rb
│   │   │   ├── text_query.rb
│   │   │   └── title_query.rb
│   │   ├── rack_test/
│   │   │   ├── browser.rb
│   │   │   ├── css_handlers.rb
│   │   │   ├── driver.rb
│   │   │   ├── errors.rb
│   │   │   ├── form.rb
│   │   │   └── node.rb
│   │   ├── rails.rb
│   │   ├── registration_container.rb
│   │   ├── registrations/
│   │   │   ├── drivers.rb
│   │   │   ├── patches/
│   │   │   │   └── puma_ssl.rb
│   │   │   └── servers.rb
│   │   ├── result.rb
│   │   ├── rspec/
│   │   │   ├── features.rb
│   │   │   ├── matcher_proxies.rb
│   │   │   ├── matchers/
│   │   │   │   ├── base.rb
│   │   │   │   ├── become_closed.rb
│   │   │   │   ├── compound.rb
│   │   │   │   ├── count_sugar.rb
│   │   │   │   ├── have_ancestor.rb
│   │   │   │   ├── have_current_path.rb
│   │   │   │   ├── have_selector.rb
│   │   │   │   ├── have_sibling.rb
│   │   │   │   ├── have_text.rb
│   │   │   │   ├── have_title.rb
│   │   │   │   ├── match_selector.rb
│   │   │   │   ├── match_style.rb
│   │   │   │   └── spatial_sugar.rb
│   │   │   └── matchers.rb
│   │   ├── rspec.rb
│   │   ├── selector/
│   │   │   ├── builders/
│   │   │   │   ├── css_builder.rb
│   │   │   │   └── xpath_builder.rb
│   │   │   ├── css.rb
│   │   │   ├── definition/
│   │   │   │   ├── button.rb
│   │   │   │   ├── checkbox.rb
│   │   │   │   ├── css.rb
│   │   │   │   ├── datalist_input.rb
│   │   │   │   ├── datalist_option.rb
│   │   │   │   ├── element.rb
│   │   │   │   ├── field.rb
│   │   │   │   ├── fieldset.rb
│   │   │   │   ├── file_field.rb
│   │   │   │   ├── fillable_field.rb
│   │   │   │   ├── frame.rb
│   │   │   │   ├── id.rb
│   │   │   │   ├── label.rb
│   │   │   │   ├── link.rb
│   │   │   │   ├── link_or_button.rb
│   │   │   │   ├── option.rb
│   │   │   │   ├── radio_button.rb
│   │   │   │   ├── select.rb
│   │   │   │   ├── table.rb
│   │   │   │   ├── table_row.rb
│   │   │   │   └── xpath.rb
│   │   │   ├── definition.rb
│   │   │   ├── filter.rb
│   │   │   ├── filter_set.rb
│   │   │   ├── filters/
│   │   │   │   ├── base.rb
│   │   │   │   ├── expression_filter.rb
│   │   │   │   ├── locator_filter.rb
│   │   │   │   └── node_filter.rb
│   │   │   ├── regexp_disassembler.rb
│   │   │   ├── selector.rb
│   │   │   └── xpath_extensions.rb
│   │   ├── selector.rb
│   │   ├── selenium/
│   │   │   ├── atoms/
│   │   │   │   └── src/
│   │   │   │       ├── getAttribute.js
│   │   │   │       └── isDisplayed.js
│   │   │   ├── driver.rb
│   │   │   ├── driver_specializations/
│   │   │   │   ├── chrome_driver.rb
│   │   │   │   ├── edge_driver.rb
│   │   │   │   ├── firefox_driver.rb
│   │   │   │   ├── internet_explorer_driver.rb
│   │   │   │   └── safari_driver.rb
│   │   │   ├── extensions/
│   │   │   │   ├── file_input_click_emulation.rb
│   │   │   │   ├── find.rb
│   │   │   │   ├── html5_drag.rb
│   │   │   │   ├── modifier_keys_stack.rb
│   │   │   │   └── scroll.rb
│   │   │   ├── node.rb
│   │   │   ├── nodes/
│   │   │   │   ├── chrome_node.rb
│   │   │   │   ├── edge_node.rb
│   │   │   │   ├── firefox_node.rb
│   │   │   │   ├── ie_node.rb
│   │   │   │   └── safari_node.rb
│   │   │   └── patches/
│   │   │       ├── atoms.rb
│   │   │       ├── is_displayed.rb
│   │   │       ├── logs.rb
│   │   │       ├── pause_duration_fix.rb
│   │   │       └── persistent_client.rb
│   │   ├── server/
│   │   │   ├── animation_disabler.rb
│   │   │   ├── checker.rb
│   │   │   └── middleware.rb
│   │   ├── server.rb
│   │   ├── session/
│   │   │   ├── config.rb
│   │   │   └── matchers.rb
│   │   ├── session.rb
│   │   ├── spec/
│   │   │   ├── fixtures/
│   │   │   │   ├── another_test_file.txt
│   │   │   │   ├── no_extension
│   │   │   │   └── test_file.txt
│   │   │   ├── public/
│   │   │   │   ├── jquery-ui.js
│   │   │   │   ├── jquery.js
│   │   │   │   ├── offset.js
│   │   │   │   └── test.js
│   │   │   ├── session/
│   │   │   │   ├── accept_alert_spec.rb
│   │   │   │   ├── accept_confirm_spec.rb
│   │   │   │   ├── accept_prompt_spec.rb
│   │   │   │   ├── active_element_spec.rb
│   │   │   │   ├── all_spec.rb
│   │   │   │   ├── ancestor_spec.rb
│   │   │   │   ├── assert_all_of_selectors_spec.rb
│   │   │   │   ├── assert_current_path_spec.rb
│   │   │   │   ├── assert_selector_spec.rb
│   │   │   │   ├── assert_style_spec.rb
│   │   │   │   ├── assert_text_spec.rb
│   │   │   │   ├── assert_title_spec.rb
│   │   │   │   ├── attach_file_spec.rb
│   │   │   │   ├── body_spec.rb
│   │   │   │   ├── check_spec.rb
│   │   │   │   ├── choose_spec.rb
│   │   │   │   ├── click_button_spec.rb
│   │   │   │   ├── click_link_or_button_spec.rb
│   │   │   │   ├── click_link_spec.rb
│   │   │   │   ├── current_scope_spec.rb
│   │   │   │   ├── current_url_spec.rb
│   │   │   │   ├── dismiss_confirm_spec.rb
│   │   │   │   ├── dismiss_prompt_spec.rb
│   │   │   │   ├── element/
│   │   │   │   │   ├── assert_match_selector_spec.rb
│   │   │   │   │   ├── match_css_spec.rb
│   │   │   │   │   ├── match_xpath_spec.rb
│   │   │   │   │   └── matches_selector_spec.rb
│   │   │   │   ├── evaluate_async_script_spec.rb
│   │   │   │   ├── evaluate_script_spec.rb
│   │   │   │   ├── execute_script_spec.rb
│   │   │   │   ├── fill_in_spec.rb
│   │   │   │   ├── find_button_spec.rb
│   │   │   │   ├── find_by_id_spec.rb
│   │   │   │   ├── find_field_spec.rb
│   │   │   │   ├── find_link_spec.rb
│   │   │   │   ├── find_spec.rb
│   │   │   │   ├── first_spec.rb
│   │   │   │   ├── frame/
│   │   │   │   │   ├── frame_title_spec.rb
│   │   │   │   │   ├── frame_url_spec.rb
│   │   │   │   │   ├── switch_to_frame_spec.rb
│   │   │   │   │   └── within_frame_spec.rb
│   │   │   │   ├── go_back_spec.rb
│   │   │   │   ├── go_forward_spec.rb
│   │   │   │   ├── has_all_selectors_spec.rb
│   │   │   │   ├── has_ancestor_spec.rb
│   │   │   │   ├── has_any_selectors_spec.rb
│   │   │   │   ├── has_button_spec.rb
│   │   │   │   ├── has_css_spec.rb
│   │   │   │   ├── has_current_path_spec.rb
│   │   │   │   ├── has_element_spec.rb
│   │   │   │   ├── has_field_spec.rb
│   │   │   │   ├── has_link_spec.rb
│   │   │   │   ├── has_none_selectors_spec.rb
│   │   │   │   ├── has_select_spec.rb
│   │   │   │   ├── has_selector_spec.rb
│   │   │   │   ├── has_sibling_spec.rb
│   │   │   │   ├── has_table_spec.rb
│   │   │   │   ├── has_text_spec.rb
│   │   │   │   ├── has_title_spec.rb
│   │   │   │   ├── has_xpath_spec.rb
│   │   │   │   ├── headers_spec.rb
│   │   │   │   ├── html_spec.rb
│   │   │   │   ├── matches_style_spec.rb
│   │   │   │   ├── node_spec.rb
│   │   │   │   ├── node_wrapper_spec.rb
│   │   │   │   ├── refresh_spec.rb
│   │   │   │   ├── reset_session_spec.rb
│   │   │   │   ├── response_code_spec.rb
│   │   │   │   ├── save_and_open_page_spec.rb
│   │   │   │   ├── save_and_open_screenshot_spec.rb
│   │   │   │   ├── save_page_spec.rb
│   │   │   │   ├── save_screenshot_spec.rb
│   │   │   │   ├── screenshot_spec.rb
│   │   │   │   ├── scroll_spec.rb
│   │   │   │   ├── select_spec.rb
│   │   │   │   ├── selectors_spec.rb
│   │   │   │   ├── sibling_spec.rb
│   │   │   │   ├── text_spec.rb
│   │   │   │   ├── title_spec.rb
│   │   │   │   ├── uncheck_spec.rb
│   │   │   │   ├── unselect_spec.rb
│   │   │   │   ├── visit_spec.rb
│   │   │   │   ├── window/
│   │   │   │   │   ├── become_closed_spec.rb
│   │   │   │   │   ├── current_window_spec.rb
│   │   │   │   │   ├── open_new_window_spec.rb
│   │   │   │   │   ├── switch_to_window_spec.rb
│   │   │   │   │   ├── window_opened_by_spec.rb
│   │   │   │   │   ├── window_spec.rb
│   │   │   │   │   ├── windows_spec.rb
│   │   │   │   │   └── within_window_spec.rb
│   │   │   │   └── within_spec.rb
│   │   │   ├── spec_helper.rb
│   │   │   ├── test_app.rb
│   │   │   └── views/
│   │   │       ├── animated.erb
│   │   │       ├── buttons.erb
│   │   │       ├── fieldsets.erb
│   │   │       ├── form.erb
│   │   │       ├── frame_child.erb
│   │   │       ├── frame_one.erb
│   │   │       ├── frame_parent.erb
│   │   │       ├── frame_two.erb
│   │   │       ├── header_links.erb
│   │   │       ├── host_links.erb
│   │   │       ├── initial_alert.erb
│   │   │       ├── layout.erb
│   │   │       ├── obscured.erb
│   │   │       ├── offset.erb
│   │   │       ├── path.erb
│   │   │       ├── popup_one.erb
│   │   │       ├── popup_two.erb
│   │   │       ├── postback.erb
│   │   │       ├── react.erb
│   │   │       ├── scroll.erb
│   │   │       ├── spatial.erb
│   │   │       ├── tables.erb
│   │   │       ├── with_animation.erb
│   │   │       ├── with_base_tag.erb
│   │   │       ├── with_count.erb
│   │   │       ├── with_dragula.erb
│   │   │       ├── with_fixed_header_footer.erb
│   │   │       ├── with_hover.erb
│   │   │       ├── with_hover1.erb
│   │   │       ├── with_html.erb
│   │   │       ├── with_html5_svg.erb
│   │   │       ├── with_html_entities.erb
│   │   │       ├── with_jquery_animation.erb
│   │   │       ├── with_js.erb
│   │   │       ├── with_jstree.erb
│   │   │       ├── with_namespace.erb
│   │   │       ├── with_scope.erb
│   │   │       ├── with_scope_other.erb
│   │   │       ├── with_shadow.erb
│   │   │       ├── with_simple_html.erb
│   │   │       ├── with_slow_unload.erb
│   │   │       ├── with_sortable_js.erb
│   │   │       ├── with_unload_alert.erb
│   │   │       ├── with_windows.erb
│   │   │       └── within_frames.erb
│   │   ├── version.rb
│   │   └── window.rb
│   └── capybara.rb
└── spec/
    ├── basic_node_spec.rb
    ├── capybara_spec.rb
    ├── counter_spec.rb
    ├── css_builder_spec.rb
    ├── css_splitter_spec.rb
    ├── dsl_spec.rb
    ├── filter_set_spec.rb
    ├── fixtures/
    │   ├── capybara.csv
    │   ├── certificate.pem
    │   ├── key.pem
    │   ├── selenium_driver_rspec_failure.rb
    │   └── selenium_driver_rspec_success.rb
    ├── minitest_spec.rb
    ├── minitest_spec_spec.rb
    ├── per_session_config_spec.rb
    ├── rack_test_spec.rb
    ├── regexp_dissassembler_spec.rb
    ├── result_spec.rb
    ├── rspec/
    │   ├── features_spec.rb
    │   ├── scenarios_spec.rb
    │   ├── shared_spec_matchers.rb
    │   └── views_spec.rb
    ├── rspec_matchers_spec.rb
    ├── rspec_spec.rb
    ├── sauce_spec_chrome.rb
    ├── selector_spec.rb
    ├── selenium_spec_chrome.rb
    ├── selenium_spec_chrome_remote.rb
    ├── selenium_spec_edge.rb
    ├── selenium_spec_firefox.rb
    ├── selenium_spec_firefox_remote.rb
    ├── selenium_spec_ie.rb
    ├── selenium_spec_safari.rb
    ├── server_spec.rb
    ├── session_spec.rb
    ├── shared_selenium_node.rb
    ├── shared_selenium_session.rb
    ├── spec_helper.rb
    ├── whitespace_normalizer_spec.rb
    └── xpath_builder_spec.rb

================================================
FILE CONTENTS
================================================

================================================
FILE: .codeclimate.yml
================================================
---
version: "2"
checks:
  method-count:
    enabled: false
  file-lines:
    config:
      threshold: 500
  method-complexity:
    config:
      threshold: 10
engines:
  bundler-audit:
    enabled: false
  csslint:
    enabled: false
  duplication:
    enabled: true
    exclude_patterns:
    - "lib/capybara/selector.rb"
    - "lib/capybara/minitest.rb"
    - "lib/capybara/selector/definition/"
    - "lib/capybara/rspec/matchers/"
    config:
      languages:
        ruby:
          mass_threshold: 25
  eslint:
    enabled: false
  fixme:
    enabled: true
  rubocop:
    enabled: true
    channel: rubocop-0-72
    exclude_fingerprints:
    - affb30770e6ef0780044f5646e28d817
ratings:
  paths:
  - Gemfile.lock
  - "**.css"
  - "**.inc"
  - "**.js"
  - "**.jsx"
  - "**.module"
  - "**.php"
  - "**.py"
  - "**.rb"
exclude_paths:
- features/
- spec/
- lib/capybara/spec/


================================================
FILE: .gitattributes
================================================
lib/capybara/spec/views/*.erb eol=lf

================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
**Note:** This is for issues with Capybara.  If you have a howto type question, please ask on the mailing list as requested in the README: http://groups.google.com/group/ruby-capybara

## Meta
Capybara Version:
<!-- 2.8.1? -->
Driver Information (and browser if relevant):
<!-- selenium-webdriver 2.53.4 with Firefox 47.0.1? capybara-webkit? Poltergeist? -->

## Expected Behavior

## Actual Behavior
<!-- include full stacktrace of any error -->

## Steps to reproduce
<!--
Please be sure to include the code that is creating the issue along with HTML the code is being run against
-->


================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"


================================================
FILE: .github/lock.yml
================================================
# Configuration for Lock Threads - https://github.com/dessant/lock-threads

# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 30

# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false

# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []

# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false

# Comment to post before locking. Set to `false` to disable
lockComment: false

# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: false

# Limit to only `issues` or `pulls`
only: issues

# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
#   exemptLabels:
#     - help-wanted
#   lockLabel: outdated

# pulls:
#   daysUntilLock: 30

# Repository to extend settings from
# _extends: repo

================================================
FILE: .github/workflows/build.yml
================================================
# This workflow will download a prebuilt Ruby version, install dependencies and
# run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: Build

"on": push

env:
  CUCUMBER_PUBLISH_QUIET: true
  RUBYOPTS: "--disable-did-you-mean"
  NOKOGIRI_USE_SYSTEM_LIBRARIES: true
  JAVA_OPTS: "-Djava.security.egd=file:/dev/urandom"
  WD_CACHE_TIME: 0

jobs:
  rack_smoke:
    runs-on: ubuntu-latest

    env:
      HTML5_PARSING: true

    strategy:
      fail-fast: false
      matrix:
        ruby: ["3.2", "3.3", "3.4"]
        task: ["rack_smoke", "cucumber"]

    steps:
      - uses: actions/checkout@v4

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run smoke tests
        run: bundle exec rake ${{ matrix.task }}

  headless:
    runs-on: ubuntu-latest

    env:
      HEADLESS: true

    strategy:
      # Ensure all jobs are run to completion
      fail-fast: false
      matrix:
        ruby: ["3.2"]
        task: ["spec_chrome", "spec_firefox"]

    steps:
      - uses: actions/checkout@v4

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run tests
        run: bundle exec rake ${{ matrix.task }}

  headless_base_versions:
    runs-on: ubuntu-latest

    env:
      HEADLESS: true
      BUNDLE_GEMFILE: gemfiles/Gemfile.base-versions

    strategy:
      # Ensure all jobs are run to completion
      fail-fast: false
      matrix:
        ruby: ["3.2"]
        task: ["spec_chrome", "spec_firefox"]

    steps:
      - uses: actions/checkout@v4
      - name: Install non-ruby dependencies
        run: |
          sudo apt-get update
          sudo apt-get install libxslt-dev

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run tests
        run: bundle exec rake ${{ matrix.task }}

  # remote_chrome:
  #   runs-on: ubuntu-latest

  #   strategy:
  #     matrix:
  #       ruby: ["3.0"]

  #   steps:
  #     - uses: actions/checkout@v4

  #     - name: Set up Ruby
  #       uses: ruby/setup-ruby@v1
  #       with:
  #         ruby-version: ${{ matrix.ruby }}
  #         bundler-cache: true
  #     - name: Run remote Chrome
  #       run: docker-compose up -d selenium_chrome
  #     - name: Run specs
  #       run: bundle exec rake spec_chrome_remote

  # remote_firefox:
  #   runs-on: ubuntu-latest

  #   strategy:
  #     matrix:
  #       ruby: ["3.1"]

  #   steps:
  #     - uses: actions/checkout@v4

  #     - name: Set up Ruby
  #       uses: ruby/setup-ruby@v1
  #       with:
  #         ruby-version: ${{ matrix.ruby }}
  #         bundler-cache: true
  #     - name: Run remote Firefox
  #       run: docker-compose up -d selenium_firefox
  #     - name: Run specs
  #       run: bundle exec rake spec_firefox_remote

  non_headless:
    runs-on: ubuntu-latest

    strategy:
      # Ensure all jobs are run to completion
      fail-fast: false
      matrix:
        ruby: ["3.2"]
        task: ["spec_chrome", "spec_firefox"]

    steps:
      - uses: actions/checkout@v4
      - name: Install non-ruby dependencies
        run: |
          sudo apt-get update
          sudo apt-get install xvfb fluxbox

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run tests inside a window manager
        run: xvfb-run sh -c "fluxbox & bundle exec rake ${{ matrix.task }}; killall fluxbox"

  rack_3:
    runs-on: ubuntu-latest

    env:
      HEADLESS: true
      BUNDLE_GEMFILE: gemfiles/Gemfile.rack3

    strategy:
      fail-fast: false
      matrix:
        ruby: ["3.4"]
        task: ["spec_rack"]

    steps:
      - uses: actions/checkout@v4

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run smoke tests
        run: bundle exec rake ${{ matrix.task }}




================================================
FILE: .gitignore
================================================
.rbx
.idea/
.DS_Store
pkg
tmp
*~
*swp
*gem
spec.opts
.rvmrc
.ruby-version
.java-version
.ruby-gemset
capybara-*.html
.yardoc
doc
.bundle
Gemfile*.lock
chromedriver.log
bundler_stubs
bin
gem-private_key.pem
save_path_tmp
vendor/bundle
.byebug_history


================================================
FILE: .rspec
================================================
--color
--order random
--require rspec/instafail
--format RSpec::Instafail
--format progress


================================================
FILE: .rubocop.yml
================================================
plugins:
  - rubocop-minitest
  - rubocop-performance
  - rubocop-rake
  - rubocop-capybara
  - rubocop-rspec

AllCops:
  NewCops: enable
  DisabledByDefault: false
  TargetRubyVersion: 3.2
  Exclude:
      - 'vendor/**/*'
      - 'gemfiles/vendor/**/*'

#################### Capybara ##################

Capybara/NegationMatcher:
  Enabled: false

RSpec/SpecFilePathFormat:
  Enabled: false

RSpec/SpecFilePathSuffix:
  Enabled: false

Capybara/FindAllFirst:
  Enabled: false

Capybara/NegationMatcherAfterVisit:
  Enabled: false

Capybara/RSpec/HaveSelector:
  Enabled: false

Capybara/SpecificFinders:
  Enabled: false

Capybara/ClickLinkOrButtonStyle:
  Enabled: false

#################### Gemspec ###################

Gemspec/DevelopmentDependencies:
  Enabled: false

#################### Layout ####################

Layout/AccessModifierIndentation:
  EnforcedStyle: outdent

Layout/CaseIndentation:
  EnforcedStyle: end

Layout/EmptyLineBetweenDefs:
  AllowAdjacentOneLineDefs: true

Layout/EndAlignment:
  EnforcedStyleAlignWith: variable

Layout/FirstArrayElementIndentation:
  EnforcedStyle: consistent

Layout/IndentationWidth:
  AllowedPatterns: ['^\s*module']

Layout/LineLength:
  # Limit lines to 120 characters
  # https://github.com/rubocop/ruby-style-guide#maximum-line-length
  Exclude:
    - 'spec/**/*'
    - 'lib/capybara/spec/**/*'
  AllowedPatterns:
    - '\s+# _?rubocop'
    - '^\s*#'
    - '^\s*(raise|warn|Capybara::Helpers.warn) '
  Max: 120

#################### Lint ####################

Lint/EmptyBlock:
  Exclude:
    - 'lib/capybara/spec/**/*'
    - 'spec/**/*.rb'

Lint/UnusedMethodArgument:
  Exclude:
    - 'lib/capybara/driver/base.rb'
    - 'lib/capybara/driver/node.rb'

#################### Metrics ####################

Metrics/AbcSize:
  Enabled: false

Metrics/BlockLength:
  Exclude:
    - 'spec/**/*'
    - 'lib/capybara/spec/**/*'
    - 'capybara.gemspec'
  AllowedMethods:
    - Capybara.add_selector
    - Capybara::Selector::FilterSet.add

Metrics/ClassLength:
  CountComments: false
  Enabled: false

Metrics/CyclomaticComplexity:
  Enabled: false

Metrics/MethodLength:
  CountComments: false
  Enabled: false

Metrics/ModuleLength:
  Enabled: false
  CountComments: false

Metrics/ParameterLists:
  CountKeywordArgs: false

Metrics/PerceivedComplexity:
  Enabled: false

#################### Naming ####################

Naming/MethodParameterName:
  AllowedNames:
    - 'el'
    - 'id'
    - 'c'
    - 'x'
    - 'y'
    - 'on'

Naming/PredicatePrefix:
  Exclude:
    - '**/*/*matchers.rb'
    - '**/*/matchers/base.rb'
    - '**/*/matchers/match_style.rb'

#################### Performance ####################

Performance/MethodObjectAsBlock:
  Enabled: false

Performance/StringIdentifierArgument:
  Enabled: false

#################### RSpec ####################

# Capybara/FeatureMethods:
#   Enabled: false

RSpec/ContextWording:
  Enabled: false

RSpec/DescribeClass:
  Enabled: false

RSpec/ExampleLength:
  Enabled: false

RSpec/ExampleWording:
  Enabled: false

# RSpec/FilePath:
#   Enabled: false

RSpec/InstanceVariable:
  AssignmentOnly: true

RSpec/MultipleExpectations:
  Enabled: false

RSpec/NestedGroups:
  Enabled: false

RSpec/NoExpectationExample:
  Enabled: false

RSpec/PredicateMatcher:
  Exclude:
    - 'spec/basic_node_spec.rb'

#################### Security ####################

Security/YAMLLoad:
  Exclude:
    - 'lib/capybara/spec/**/*'
    - 'spec/**/*'

#################### Style ####################

Style/AccessorGrouping:
  Enabled: false

Style/Alias:
  Enabled: false

Style/ArgumentsForwarding:
  Enabled: false

Style/ClassAndModuleChildren:
  Enabled: false

Style/Documentation:
  Exclude:
    - 'lib/capybara/spec/**/*'
    - 'spec/**/*'
  Enabled: false

Style/DocumentDynamicEvalDefinition:
  Enabled: false

Style/EmptyElse:
  EnforcedStyle: empty

Style/IfUnlessModifier:
  Exclude:
    - 'spec/**/*'

Style/NumericLiterals:
  Exclude:
    - 'lib/capybara/spec/**/*'
    - 'spec/**/*'

Style/ParallelAssignment:
  Enabled: false

Style/SingleLineMethods:
  Enabled: false

Style/SpecialGlobalVars:
  Exclude:
    - 'capybara.gemspec'

### Enable and fix
Style/KeywordArgumentsMerging:
  Enabled: false

Gemspec/AddRuntimeDependency:
  Enabled: false

Lint/UselessConstantScoping:
  Enabled: false

Naming/PredicateMethod:
  Enabled: false

RSpec/IncludeExamples:
  Enabled: false

Style/SuperArguments:
  Enabled: false

Style/FileNull:
  Enabled: false

Naming/BlockForwarding:
  Enabled: false

Style/ArrayIntersect:
  Enabled: false

================================================
FILE: .yardopts
================================================
--markup markdown


================================================
FILE: CONTRIBUTING.md
================================================
## Questions about Capybara?

To get your questions answered, please ask on the [mailing list]. Do not open
an issue.

## Bug Reports

If you are at all unsure whether it's a bug in Capybara or a problem with your
code, post on the [mailing list] instead. If it turns out that it is a bug, we
can always open an issue later.

If you are sure that it's a bug in Capybara, open a new [issue] and try to
answer the following questions:

- What did you do?
- What did you expect to happen?
- What happened instead?

Please also post code to replicate the bug. Ideally a failing test would be
perfect, but even a simple script demonstrating the error would suffice. You
could use [this template](https://gist.github.com/jnicklas/5137053) as a
starting point. Please don't send us an entire application, unless the bug is
in the *interaction* between Capybara and a particular framework.

Make sure to specify which version of Capybara you are using.

Feature requests are great, but they usually end up lying around the issue
tracker indefinitely. Sending a pull request is a much better way of getting a
particular feature into Capybara.

## Pull Requests

- **Add tests!** Your patch won't be accepted if it doesn't have tests.  
To run a single test or scenario in development use `:focus_` metadata, e.g.:  
`it 'should simulate multiple held down modifier keys', :focus_ do`

- **Document any change in behaviour**. Make sure the README and any other
  relevant documentation are kept up-to-date.

- **Consider our release cycle**. We try to follow semver. Randomly breaking
  public APIs is not an option.

- **Create topic branches**. Don't ask us to pull from your master branch.

- **One pull request per feature**. If you want to do more than one thing, send
  multiple pull requests.

- **Send coherent history**. Make sure each individual commit in your pull
  request is meaningful. If you had to make multiple intermediate commits while
  developing, please squash them before sending them to us.

[mailing list]: http://groups.google.com/group/ruby-capybara
[issue]: https://github.com/teamcapybara/capybara/issues


================================================
FILE: Gemfile
================================================
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'bundler', '< 3.0'
gemspec

gem 'xpath', github: 'teamcapybara/xpath'
# gem 'rack-test', github: 'rack/rack-test'

group :doc do
  gem 'redcarpet', platforms: :mri
end


================================================
FILE: History.md
================================================
# Version 3.40.0
Release date: 2024-01-26

### Changned

* Dropped support for Ruby 2.7, 3.0+ is now required
* Dropped support for Selenium < 4.8
* Use the new headless option on chromedriver with registered selenium driver [Neil Carvalho]

### Added

* `Capybara::Result#to_ary` to support multiple assignment [Sean Doyle]
* `has_element?` and related matchers [Sean Doyle]
*  Rack 3 support

### Fixed

* Forward save_screenshot options to selenium - Issue 2738
* Rack test - don't auto submit forms with multiple inputs [Mitchell Henke]
* Table row selector matches cell values in order - Issue 2686 [Jeff Parr]
* Table row selector fixes for first column - Issue 2685 [Jeff Par]

# Version 3.39.2
Release date: 2023-06-10

### Fixed

* Fix Selenium version comparison [aki77]

# Version 3.39.1
Release date: 2023-05-12

### Fixed

* Fix usage of Selenium logger

# Version 3.39.0
Release date: 2023-04-02

### Added

* Support `:target` filter option on `:link` selector [Yudai Takada]
* Experimental Rack 3 support
* Text normalization performance improvements [Brandon Weaver]

### Fixed

* MS Edge button click [Brian J. Bayer]
* Options/Capabilities choosing based on Selenium versions
* Support for base versions [Matijs van Zuijlen]
* ExpectedError not defined in Selenium 4+
* Filter block forwarding to a number of matchers [Christophe Bliard]
###  Changed

* Dropped support for rack 1.x

# Version 3.38.0
Release date: 2022-11-03

### Changed

* Capybara.w3c_click_offset now defaults to true. If you need click offsets to be from the elements top left corner set it to false in your config

### Added

* Support Selenium 4.3 changes to click offset calculations
* `click`, `double_click`, `right_click` can now be called on the session to click the currently scoped element (or document)
* `Session#within` now passes the scoped element to the block
* Support rack-test 2+
* Retry interval is now configurable [Masahiro NOMOTO]
* Support Puma 6 - Issue #2590
* Selenium: DetachedShadowRootError is treated as an invalid element error [Perryn Fowler]
* Selenium: When inspected shadow roots will have a tag name of "ShadowRoot"
* `evaluate_async_script` added to Session::DSL_METHODS [Henry Blyth]

### Fixed

* Use higher precision clock in Capybara::Helpers::Timer if available
* rack-test driver behavior with \r\n - Issue #2547 [Stefan Hoffmann]
* Updated for deprecation of positional parameters in Selenium::WebDriver::ActionBuilder#pause
* Explicitly set cause on server raised errors
* Options no longer duplicated in have_xxx invalid option error message [Yudai Takada]
* Animation disabler is now threadsafe [Daniel Sheppard]
* Server connection count tracking [Oleksandr K.]
* Ensure scopes are reset when session is [Henry Blyth]

# Version 3.37.1
Release date: 2022-05-09

### Fixed

* Regression in rack-test visit - Issue #2548

# Version 3.37.0
Release date: 2022-05-07

### Changed

* Ruby 2.7.0+ is now required

### Added

* [Beta] CSP nonces inserted into animation disabler additions - Issue #2542
* Support `<base>` element in rack-test driver - ISsue #2544
* [Beta] `Element#shadow_root` support. Requires selenium-webdriver 4.1+. Only currently supported with Chrome when using the selenium driver. Note: only CSS can be used to find elements from the shadow root. Therefore you won't be able to use most Capybara helper methods (`fill_in`, `click_link`, `find_field`, etc) directly from the shadow root since those locators are built using XPath. If you first locate a descendant from the shadow root using CSS then you should be able to use all the Capybara methods from there.
* Regexp now supported for `exact_text` finder option

### Fixed

* Fragments in referer headers in rack-test driver - Issue #2525
* Selenium v4.1 deprecation notice

# Version 3.36.0
Release date: 2021-10-24

### Changed

* Ruby 2.6.0+ is now required
* Minimum selenium-webdriver supported is now 3.142.7

### Added

* Support for selenium-webdriver 4.x
* `allow_label_click` accepts click options to be used when clicking an associated label
* Deprecated `allow_gumbo=` in favor of `use_html5_parsing=` to enable use of Nokogiri::HTML5 when available
* `Session#active_element` returns the element with focus - Not supported by the `RackTest` driver [Sean Doyle]
* Support `focused:` filter for finding interactive elements - Not supported by the `RackTest` driver [Sean Doyle]

### Fixed

* Sibling and ancestor queries now work with Simple::Node - Issue #2452
* rack_test correctly ignores readonly attribute on specific input element types
* `Node#all_text` always returns a string - Issue #2477
* `have_any_of_selectors` negated match - Issue #2473
* `Document#scroll_to` fixed for standards behavior - pass quirks: true if you need the older behavior [Eric Anderson]
* Use capture on attach file event listener for better React compatibility [Jeff Way]
* Animation disabler produces valid HTML [Javi Martin]

### Removed

* References to non-w3c mode in drivers/tests. Non-w3c mode is obsolete and no one should be using it anymore. Capybara hasn't been testing/supporting it in a while

# Version 3.35.3
Release date: 2021-01-29

### Fixed

* Just a release to have the correct dates in the History.md in released gem

# Version 3.35.2
Release date: 2021-01-29

### Fixed

* Selenium deprecation suppressor with Selenium 3.x

# Version 3.35.1
Release date: 2021-01-26

### Fixed

* Default chrome driver registrations use chrome - Issue #2442 [Yuriy Alekseyev]
* 'Capybara.test_id' usage with the :button selector - Issue #2443

# Version 3.35.0
Release date: 2021-01-25

### Added

* Support Regexp matching for individual class names in :class filter passed an Array
* Animation disabler now supports JQuery animation disabling when JQuery loaded from body [Chien-Wei Huang]

### Fixed

* :button selector type use with `enable_aria_role` [Sean Doyle]
* <label> elements don't associate with aria-role buttons
* Ignore Selenium::WebDriver::Error::InvalidSessionIdError when quitting driver [Robin Daugherty]
* Firefox: Don't click input when sending keys if already focused
* Miscellaneous issues with selenium-webdriver 4.0.0.alphas
* Nil return error in node details optimizations
* Animation disabler now inserts XHTML compliant content [Dale Morgan]

# Version 3.34.0
Release date: 2020-11-26

### Added

* Ability to fill in with emoji when using Chrome with selenium driver (Firefox already worked)
* Current path assertions/expectations accept optional filter block
* Animation disabler now specifies `scroll-behavior: auto;` [Nathan Broadbent]
* :button selector can now find elements by label text [Sean Doyle]
* `Session#send_keys` to send keys to the current element with focus in drivers that support the
  concept of a current element [Sean Doyle]

### Changed

* Text query validates the type parameter to prevent undefined behavior

### Fixed

* racktest driver better handles fragments and redirection to urls that include fragments
* Don't error when attempting to get XPath location of a shadow element
* Missing `readonly?` added to Node::Simple
* Selenium version detection when loaded via alternate method [Joel Hawksley]
* Connection count issue if REQUEST_URI value changed by app [Blake Williams]
* Maintain URI fragment when redirecting in rack-test driver
* Text query error message [Wojciech Wnętrzak]
* Checking a checkbox/radio button with `allow_label_click` now works if there are multiple labels (Issue #2421)
* `drop` with `Pathname` (Issue #2424)[Máximo Mussini]

# Version 3.33.0
Release date: 2020-06-21

### Added

* Block passed to `within_session` now receives the new and old session
* Support for aria-role button when enabled [Seiei Miyagi]
* Support for aria-role link when enabled
* Support for `validation_message` filter with :field and :fillable_field selectors
* Deprecation warnings show source location [Koichi ITO]

### Changed

* Ruby 2.5.0+ is now required
* Deprecated direct manipulation of the driver and server registries

### Fixed

* Ruby 2.7 warning in minitest `assert_text` [Eileen M. Uchitelle]


# Version 3.32.2
Release date: 2020-05-16

### Fixed

* Don't use lazy enumerator with JRuby due to leaking threads
* Ruby 2.7 deprecation warning when registering Webrick [Jon Zeppieri]
* `have_text` description [Juan Pablo Rinaldi]

# Version 3.32.1
Release date: 2020-04-05

### Fixed

* Rapid set now respects field maxlength (Issue #2332)
* Only patch pause into legacy actions in Selenium < 4 (Issue #2334)

# Version 3.32.0
Release date: 2020-03-29

### Added

* Support `delay` setting on click with Selenium
* Implement rapid set for values longer than 30 characters in text fields with Selenium

### Fixed

* Result#[] and negative max on ranges (Issue #2302/2303) [Jeremy Evans]
* RackTest form submission rewrites query string when using GET method
* Ruby 2.7 deprecation warnings in RSpec matcher proxies

# Version 3.31.0
Release date: 2020-01-26

### Added

* Support setting range inputs with the selenium driver [Andrew White]
* Support setting range inputs with the rack driver
* Support drop modifier keys in drag & drop [Elliot Crosby-McCullough]
* `enabled_options` and `disabled options` filters for select selector
* Support beginless ranges
* Optionally allow `all` results to be reloaded when stable - Beta feature - may be removed in
  future version if problems occur

### Fixed

* Fix Ruby 2.7 deprecation notices around keyword arguments. I have tried to do this without
  any breaking changes, but due to the nature of the 2.7 changes and some selector types accepting
  Hashes as locators there are a lot of edge cases. If you find any broken cases please report
  them and I'll see if they're fixable.
* Clicking on details/summary element behavior in rack_test driver_

# Version 3.30.0
Release date: 2019-12-24

### Added

* Display pending requests when they don't complete in time [Juan Carlos Medina]
* :order option in selector queries - set to :reverse to for reverse document order results
* Support regexp for :name and :placeholder options in selectors that import filters from
  _field filter set

### Fixed

* Issue around automatic port assignment - Issue #2245
* Label selector when label has no id - Issue #2260
* Preserve clientX/clientY in Selenium HTML5 drag emulation [Nicolò G.]
* table selector using :with_cols option if last specified column matched but others didn't - Issue #2287
* Some tests updated for Ruby 2.7 behavior change around keyword args

# Version 3.29.0
Release date: 2019-09-02

### Added

* Allow clicking on file input when using the block version of `attach_file` with Chrome and Firefox
* Spatial filters (`left_of`, `right_of`, `above`, `below`, `near`)
* rack_test driver now supports clicking on details elements to open/close them

### Fixed

* rack_test driver correctly determines visibility for open details elements descendants

### Changed

* Results will now be lazily evaluated when using JRuby >= 9.2.8.0


# Version 3.28.0
Release date: 2019-08-03

### Added

* Allow forcing HTML5 or legacy dragging via the `:html5` option to `drag_to` when using Selenium with Chrome or Firefox
* Autodetection of drag type interprets not seeing the mousedown event as legacy.
* HTML5 form validation `:valid` node filter added to `:field` and `:fillable_field` selectors
* When using Capybara registered :puma server - patches Puma 4.0.x to fix SSL connection behavior. Removes
  default `queue_requests` setting - Issue #2227

# Version 3.27.0
Release date: 2019-07-28

### Added

* Allow to use chromedriver/geckodriver native `is_element_displayed` endpoint via Selenium
  driver `native_displayed` option for performance reasons. Disabled by default due to endpoints
  currently not handling &lt;details> element descendants visibility correctly.

### Fixed

* Ignore negative lookahead/lookbehind regex when performing initial XPath text matching
* Reloading of elements found via `ancestor` and `sibling`
* Only default puma settings to `queue_requests: false` when using SSL
* Visibility of descendants of &lt;details> elements is correctly determined when using rack_test
  and the selenium driver with Capybara optimized atoms
* local/session storage clearance in Chrome when clearing only one of them - Issue #2233

# Version 3.26.0
Release date: 2019-07-15

### Added

* `w3c_click_offset` configuration option applies to `right_click` and `double_click` as well as `click`
* Warning when passing `nil` to the text/content assertions/expectations
* `Session#server_url` returns the base url the AUT is being run at (when controlled by Capybara)
* `option` selector type accepts an integer as locator

### Fixed

* Default puma server registration now specifies `queue_requests: false` - Issue #2227
* Workaround issue with FF 68 and hanging during reset if a system modal is visible
* Don't expand file path if it's already absolute - Issue #2228

# Version 3.25.0
Release date: 2019-06-27

### Added

* Animation disabler also disables before and after pseudoelements - Issue #2221 [Daniel Heath]
* `w3c_click_offset` configuration option to determine whether click offsets are calculated from element
  center or top left corner

### Fixed

* Work around issue with chromedriver 76/77 in W3C mode losing mouse state during legacy drag. Only fixed if
  both source and target are simultaneously inside the viewport - Issue #2223
* Negative ancestor expectations/predicates were incorrectly checking siblings rather than ancestors

# Version 3.24.0
Release date: 2019-06-13

### Added

* Log access when using the Selenium driver with Chrome 75 in W3C mode has been reenabled.

### Changed

* Selenium driver now selects all current content and then sends keys rather than clearing field by JS
  and then sending keys when setting values to text inputs in order to more closely simulate user behavior

### Fixed

* Relative paths passed to `attach_file` will be assumed to be relative to the current working directory when using the
  Selenium driver

# Version 3.23.0
Release date: 2019-06-10

### Added

* Improved error message when using Chrome in W3C mode and attempting to access logs
* Support driver specific options for Element#drag_to
* Support setting `<input type="color">` elements with the selenium driver

### Fixed

* Tightened conditions when in expression text option matching will be used
* Improved Selenium drivers HTML5 drag and drop emulation compatibility with SortableJS library (and others)

# Version 3.22.0
Release date: 2019-05-29

### Added

* `ancestor`/`sibling` assertions and matchers added
* Documentation Updates and Fixes - Many thanks again to Masafumi Koba! [Masafumi Koba]
* Added `:with` alias for `:option` filter on `:checkbox` and `:radio_button` selectors

### Changed

* Selenium driver with Chrome >= 73 now resets cookies and local/session storage after navigating
  to 'about:blank' when possible to minimize potential race condition

# Version 3.21.0
Release date: 2019-05-24

### Added

* Element#drop - Chrome and Firefox, via the selenium driver, support dropping files/data on elements
* Default CSS used for `attach_file` `make_visible: true` now includes auto for
  height and width to handle more ways of hiding the file input element
* Documentation Updates and Fixes - Many thanks to Masafumi Koba! [Masafumi Koba]

### Changed

* Deprecate support for CSS locator being a Symbol

# Version 3.20.2
Release date: 2019-05-19

### Fixed

* Move `uglifier` from runtime to development dependency [miyucy]

# Version 3.20.1
Release date: 2019-05-17

### Fixed

* RackTest driver considers &lt;template> elements to be non-visible and ignores the contents

# Version 3.20.0
Release date: 2019-05-14

### Added

* `Node#obscured?` to check viewport presence and element overlap
* `:obscured` system filter to check whether elements are obscured in finders, assertions, and expectations
* :label selector :for option can be a regexp
* Significantly smaller `isDisplayed`/`getAttribute` atoms for selenium driver. If these produce issues you can disable their use
  by setting an environment variable named 'DISABLE_CAPYBARA_SELENIUM_OPTIMIZATIONS' (Please also report any issues).
* `href: false` option with `find_link`/`click_link`/:link selector ignores `href` presence/absence

### Fixed

* Workaround Safari issue with send_keys not correctly using top level modifiers
* Workaround Safari not retrying click due to incorrect error type
* Fix Safari attach_file block mode when clicking elements associated to the file input
* Workaround Safari issue with repeated hover

# Version 3.19.1
Release date: 2019-05-11

### Fixed

* Fix access to specializations when Selenium::Driver is subclassed [James Mead]

# Version 3.19.0
Release date: 2019-05-09

### Added


* Syntactic sugar `#once`, `#twice`, `#thrice`, `#exactly`, `#at_least`, `#at_most`, and `#times`
  added to `have_selector`, `have_css`, `have_xpath`, and `have_text` RSpec matchers
* Support for multiple expression types in Selector definitions
* Reduced wirecalls for common actions in Selenium driver

### Fixed

* Workaround Chrome 75 appending files to multiple file inputs
* Suppressed retry when detecting http vs https server connection

# Version 3.18.0
Release date: 2019-04-22

### Added

* XPath Selector query optimized to make use of Regexp :text option in initial element find

### Fixed

* Workaround issue where Chrome/chromedriver 74 can return the wrong error type when a click is intercepted

# Version 3.17.0
Release date: 2019-04-18

### Added

* Initial support for selenium-webdriver 4.0.0.alpha1
* :button selector will now also match on `name` attribute

### Fixed

* Suppress warnings generated by using selenium-webdriver 3.141.5926
* Mask Appium issue with finder visibility optimizations (non-optimal)

# Version 3.16.2
Release date: 2019-04-10

### Fixed

* Fix Session#quit resetting of memoized document

# Version 3.16.1
Release date: 2019-03-30

### Fixed

* Fix potential 'uninitialized constant' error when using the :selenium_chrome driver [jeffclemens-ab]

# Version 3.16
Release date: 2019-03-28

### Changed

* Ruby 2.4.0+ is now required
* Selenium driver now defaults to using a persistent http client connection

### Added

* :wait option in predicates now accepts `true` to selectively override when `Capybara.predicates_wait == false`

# Version 3.15
Release date: 2019-03-19

### Added

* `attach_file` now supports a block mode on JS capable drivers to more accurately test user behavior when file inputs are hidden (beta)
* :table selector now supports `with_rows`, 'rows', `with_cols`, and 'cols' filters

### Fixed

* Fix link selector when `Capybara.test_id` is set - Issue #2166 [bingjyang]


# Version 3.14
Release date: 2019-02-25

### Added

* rack_test driver now supports reloading elements when the document changes - Issue #2157
* Selenium driver HTML5 drag-drop emulation now emits multiple move events so drag direction
  is determinable [Erkki Eilonen, Thomas Walpole]
* Capybara.server_errors now defaults to [Exception] - Issue #2160 [Edgars Beigarts]
### Fixed

* Workaround hover issue with FF 65 - Issue #2156
* Workaround chromedriver issue when setting blank strings to react controlled text fields
* Workaround chromedriver issue with popup windows not loading content - https://bugs.chromium.org/p/chromedriver/issues/detail?id=2650&q=load&sort=-id&colspec=ID%20Status%20Pri%20Owner%20Summary

# Version 3.13.2
Release date: 2019-01-24

### Fixed

* Remove extraneous output

# Version 3.13.1
Release date: 2019-01-24

### Fixed

* Only use Selenium visibility optimization when JS atom is available - Issue #2151

# Version 3.13.0
Release date: 2019-01-23

### Added

* Session#quit added
* #scroll_to added to allow scrolling page/elements to specified locations
* Speed optimizations around multiple element location and path generation when using the Selenium driver
* Support for locator type checking in custom selectors
* Allow configuration of gumbo use - defaults to off
* `assert_style`/`has_style`/`have_style` deprecated in favor of `assert_matches_style`/`matches_styles?`/`match_style`
* :style filter added to selectors

# Version 3.12.0
Release date: 2018-11-28

### Added

* Support Ruby 2.6 endless range in Result#[] and query `:between` option
* Pre-registered headless firefox driver :selenium_headless [Andrew Havens]
* Selenium driver now defaults to clearing `sessionStorage` and `localStorage`. To disable pass `clear_local_storage: false` and/or `clear_session_storage: false` when creating Capybara::Selenium::Driver instance in your driver registration

### Fixed

* Raise error if only :x or :y are passed as an offset to click methods

### Removed

* Support for RSpec < 3.5

# Version 3.11.1
Release date: 2018-11-16

### Fixed

* Fixed :link_or_button XPath generation when it has had an expression filter added

# Version 3.11.0
Release date: 2018-11-14

### Added

* Ability for node filters to set detailed error messages
* `Capybara::HTML` Will use `nokogumbo` for HTML parsing if installed
* `Selector#locator_filter` added to allow for dynamic locator in selectors

### Fixed

* Node filters are evaluated in the context of the Selector they are used in to ensure the correct options are used

# Version 3.10.1
Release date: 2018-11-03

### Fixed

* Fix `aria-label` and `test_id` matching for `link_or_button` selector type - Issue #2125
* Fixed crash in element path creation for matcher failure messages - Issue #2120

# Version 3.10.0
Release date: 2018-10-23

### Added

* :class filter can now check for class names starting with !
* Selector `xpath`/`css` expression definitions will get filter names from block parameters if not explicitly provided
* `any_of_selectors` assertions and matchers to complement `all_of_selectors` and `none_of_selectors`

### Fixed

* Selector `css` expression definition declared filters now work again
* Cleaned up warnings [Yuji Yaginuma]
* Workaround installation of rspec matcher proxies under jruby by reverting to the old solution not using prepend, so jruby bugs are not hit - Issue #2115

# Version 3.9.0
Release date: 2018-10-03

### Added

* Selenium with Chrome removes all cookies at session reset instead of just cookies from current domain if possible
* Support for Regexp for system :id and :class filters where possible
* `using_session` now accepts a session object as well as the name of the session for users who  manually manage sessions
* The `:field` selector will now find `type = "hidden"` fields if the `type: "hidden"` filter option is provided

# Version 3.8.2
Release date: 2018-09-26

### Fixed

* Fixed negated class selector option - Issue #2103

# Version 3.8.1
Release date: 2018-09-22

### Fixed

* Filling in of date fields with a string when using selenium chrome regression [Micah Geisel]

# Version 3.8.0
Release date: 2018-09-20

### Added

* Workaround geckodriver 0.22 issue with undefined pause durations
* :element selector ignores XML namespaces

### Fixed

* Added Errno::ECONNRESET to the errors which will allows https server detection

# Version 3.7.2
Release date: 2018-09-12

### Fixed

* Fix MatchQuery based matchers when used on a root element found using any type of parent/ancestor query - Issue #2097

* Fix Chrome/FF HTML5 drag simulation for elements (a, img) which default to draggable - Issue #2098

# Version 3.7.1
Release date: 2018-09-05

### Fixed

* Restored ability to pass symbol as the CSS selector when calling `has_css?`/`have_css`/etc - Issue #2093

# Version 3.7.0
Release date: 2018-09-02

### Added

* `Capybara.disable_animation` can be set to a CSS selector to identify which elements will have animation disabled [Michael Glass]
* `Capybara.default_normalize_ws` option which sets whether or not text predicates and matchers (`has_text?`, `has_content?`, `assert_text`, etc) use `normalize_ws` option by default. Defaults to false. [Stegalin Ivan]
* Selector based predicates, matchers, and finders now support the `:normalize_ws` option for the `:text`/`:exact_text` filters. Defaults to the `Capybara.default_normalize_ws`setting above.
* Element `choose`/`check`/`uncheck`/`attach_file`/`fill_in` can now operate on the element they're called on or a descendant if no locator is passed.

### Fixed

* All CSS styles applied by the `Element#attach_file` `:make_visible` option will now have `!important` priority set to ensure they override any other specified style.
* Firefox file inputs are only manually cleared when necessary.

# Version 3.6.0
Release date: 2018-08-14

### Added

* Workaround geckodriver/firefox send_keys issues as much as possible using the Selenium actions API
* Workaround lack of HTML5 native drag and drop events when using Selenium driver with Chrome and FF >= 62
* `Capybara.predicates_wait` option which sets whether or not Capybaras matcher predicate methods (`has_css?`, `has_selector?`, `has_text?`, etc.) default to using waiting/retrying behavior (defaults to true)

# Version 3.5.1
Release date: 2018-08-03

### Fixed

* Fixed misspelled method name `refute_matches_elector` => `refute_matches_selector`

# Version 3.5.0
Release date: 2018-08-01

### Added

* text predicates and matchers (`has_text?`, `has_content?`, `assert_text`, etc) now support a `normalize_ws` option

### Fixed

* `attach_file` with Selenium and local Firefox 62+ now correctly generates only one change event when attaching multiple files

# Version 3.4.2
Release date: 2018-07-24

### Fixed

* `match_xxx` selectors and `matches_xxx?` predicates work correctly with elements found using a sibling selector - Issue #2073

# Version 3.4.1
Release date: 2018-07-20

### Fixed

* `Session#evaluate_script` now strips the script in `Session` rather than only in the Selenium driver

# Version 3.4.0
Release date: 2018-07-19

### Fixed

* Make selenium driver :backspace clear strategy work even if caret location is in middle of field content [Champier Cyril]
* Selenium issue with fieldset nested in disabled fieldset not being considered disabled
* `Session#evaluate_script` and `Element#evaluate_script` now strip leading/trailing whitespace from scripts [Ian Lesperance]

### Added

* Work around Selenium lack of support for `file_detector` with remote geckodriver
* `#within_frame` locator is optional when only one frame exists
* `Capybara.test_id` option that allows for matching the Capybara provided selector types on an arbitrary attribute
  (defaults to nil), set to your test id attribute ('data-test-id, etc) if using test id attributes in your project

# Version 3.3.1
Release date: 2018-06-27

### Fixed

* `selenium-webdriver` version check [ahorek]
* Selenium driver correctly responds to `disabled?` for fieldset elements - Issue #2059 [Thomas Walpole]

# Version 3.3.0
Release date: 2018-06-25

### Added

* RackTest driver now handles 307/308 redirects
* `execute_async_script` can now be called on elements to run the JS in the context of the element
* `:download` filter option on `:link' selector
* `Window#fullscreen`
* `Element#style` and associated matchers

### Changed

* Minimum "supported" `selenium-webdriver` is raised to 3.5.0 (but you really should be using newer than that)

### Fixes

* Selenium driver with Firefox workaround for clicking on table row - https://github.com/mozilla/geckodriver/issues/1228
* :class and :id filters applied to CSS based selectors now correctly handle the CSS comma
* Selenium driver handles namespaces when generating an elements `#path` - Issue #2048

# Version 3.2.1
Release date: 2018-06-04

### Fixes

* Only split CSS selectors when :class or :id options are given. Restores 3.1.1 functionality for now but the underlying issue
  will require a larger fix, hopefully coming soon. - Issue #2044 [Thomas Walpole]

# Version 3.2.0
Release date: 2018-06-01

### Changed

* Ruby 2.3.0+ is now required
* `ElementNotFound` errors raised in selector filters are interpreted as non-matches

### Added

* New global configuration `default_set_options` used in `Capybara::Node::Element#set` as default `options` hash [Champier Cyril]
* `execute_script` and `evaluate_script` can now be called on elements to run the JS in the context of the element [Thomas Walpole]
* Filters in custom selectors now support a `matcher` Regexp to handle multiple filter options [Thomas Walpole]
* `:element` selector type which will match on any attribute (other than the reserved names) passed as a filter option [Thomas Walpole]
* `:class` filter option now supports preceding class names with `!` to indicate not having that class [Thomas Walpole]
* `:class` and `:id` filter options now accept `XPath::Expression` objects to allow for more flexibility in matching [Thomas Walpole]
* `Capybara.disable_animation` setting which triggers loading of a middleware that attempts to disable animations in pages.
  This is very much a beta feature and may change/disappear in the future. [Thomas Walpole]

# Version 3.1.1
Release date: 2018-05-25

### Fixes

* Ensure keystrokes are sent when setting time/date fields to a string with the Selenium driver [Thomas Walpole]

# Version 3.1.0
Release date: 2018-05-10

### Added

* Support for using `select` with text inputs associated with a datalist element
* `type` filter on `:button` selector
* Support for server operating in https mode
* Selenium driver now uses JS to fill_in/set date and time fields when passed date or time objects [Aleksei Gusev, Thomas Walpole]

# Version 3.0.3
Release date: 2018-04-30

### Fixes

* Issue in `check` where the locator string could not be omitted
* Selenium browser type detection when using remote [Ian Ker-Seymer]
* Potential hang when waiting for requests to complete [Chris Zetter]

# Version 3.0.2
Release date: 2018-04-13

### Fixes

* Fix expression filter descriptions in some selector failure messages
* Fix compounding of negated matchers - Issue #2010

# Version 3.0.1
Release date: 2018-04-06

### Changed

* Restored ability for `Capybara.server=` to accept a proc which was accidentally removed in 3.0.0

# Version 3.0.0
Release date: 2018-04-05

### Changed

* Selenium driver only closes extra windows for browsers where that is known to work (Firefox, Chrome)
* "threadsafe" mode is no longer considered beta

### Fixes

* Multiple file attach_file with Firefox
* Use Puma::Server directly rather than Rack::Handler::Puma so signal handlers don't prevent test quitting

# Version 3.0.0.rc2
Release date: 2018-03-23

### Changed

* Visible text whitespace is no longer fully normalized in favor of being more in line with the WebDriver spec for visible text
* Drivers are expected to close extra windows when resetting the session
* Selenium driver supports Date/Time when filling in date/time/datetime-local inputs
* `current_url` returns the url for the top level browsing context
* `title` returns the title for the top level browsing context

### Added

* `Driver#frame_url` returns the url for the current frame
* `Driver#frame_title` returns the title for the current frame

# Version 3.0.0.rc1
Release date: 2018-03-02

### Added
* Support for libraries wrapping Capybara elements and providing a `#to_capybara_node` method

### Changed

* `first` now raises ElementNotFound, by default, instead of returning nil when no matches are found  - Issue #1507
* 'all' now waits for at least one matching element by default.  Pass `wait: false` if you want the previous
  behavior where an empty result would be returned immediately if no matching elements exist yet.
* ArgumentError raised if extra parameters passed to selector queries

### Removed

* Ruby < 2.2.2 support
* `Capybara.exact_options` no longer exists. Just use `exact: true` on relevant actions/finders if necessary.
* All previously deprecated methods removed
* RSpec 2.x support
* selenium-webdriver 2.x support
* Nokogiri < 1.8 support
* `field_labeled` alias for `find_field`

# Version 2.18.0
Release date: 2018-02-12

### Fixed

* Firefox/geckodriver setting of contenteditable childs contents
* Ignore Selenium::WebDriver::Error::SessionNotCreatedError when quitting driver [Tim Connor]

### Removed

* Headless chrome modal JS injection that is no longer needed for Chrome 64+/chromedriver 2.35+


# Version 2.17.0
Release date: 2018-01-02

### Added

* `have_all_of_selectors`, `have_none_of_selectors` RSpec matchers for parity with minitest assertions [Thomas Walpole]

### Fixed

* Allow xpath 3.x gem [Thomas Walpole]
* Issue when drivers returned nil for `current_path` and a matcher was used with a Regexp [Thomas Walpole]
* Error message when visible element not found, but non-visible was [Andy Klimczak]

# Version 2.16.1
Release date: 2017-11-20

### Fixed

* Fix rack_test driver for rack_test 0.7.1/0.8.0 [Thomas Walpole]
* `accept_prompt` response text can contain quotes when using selenium with headless chrome [Thomas Walpole]

# Version 2.16.0
Release date: 2017-11-13

### Added

* Attempt to move element into view when selenium doesn't correctly do it - See PR #1917 [Thomas Walpole]
* `current_path` matchers will now autodetect path vs url based on string to be matched. Deprecates
  `:only_path` in favor of `:ignore_query` option [Thomas Walpole]
* Session#evaluate_async_script [Thomas Walpole]

### Fixed

* Default prompt value when using headless Chrome works correctly [Thomas Walpole]
* Support new modal error returned by selenium-webdriver 3.7 for W3C drivers [Thomas Walpole]
* Calling `respond_to?` on the object passed to `Capybara.configure` block - Issue #1935

# Version 2.15.4
Release date: 2017-10-07

### Fixed
*  Visiting an absolute URL shouldn't overwrite the port when no server or always_include_port=false - Issue #1921

# Version 2.15.3
Release date: 2017-10-03

### Fixed
*  Visiting '/' when Capybara.app_host has a trailing '/' - Issue #1918 [Thomas Walpole]

# Version 2.15.2
Release date: 2017-10-02

### Fixed

*  Include within scope description in element not found/ambiguous errors [Thomas Walpole]
*  Raise error when no activation block is passed to modal methods if using headless chrome [Thomas Walpole]
*  Don't retry element access when inspecting [Ivan Neverov]
*  Don't override a specified port (even if it is default port) in visited url [Thomas Walpole]

# Version 2.15.1

Release date: 2017-08-04

### Fixed

*  `attach_file` with no extension/MIME type when using the `:rack_test` driver [Thomas Walpole]

# Version 2.15.0

Release date: 2017-08-04

### Added

*  `sibling` and `ancestor` finders added [Thomas Walpole]
*  Added ability to pass options to registered servers when setting
*  Added basic built-in driver registrations `:selenium_chrome` and `:selenium_chrome_headless` [Thomas Walpole]
*  Add `and_then` to Capybara RSpec matchers which behaves like the previous `and` compounder. [Thomas Walpole]
*  Compound RSpec expectations with Capybara matchers now run both matchers inside a retry loop rather
   than waiting for one to pass/fail before checking the second.  Will make `#or` more performant and confirm
   both conditions are true "simultaneously" for `and`.  [Thomas Walpole]
   If you still want the
*  Default filter values are now included in error descriptions [Thomas Walpole]
*  Add `Session#refresh` [Thomas Walpole]
*  Loosened restrictions on where `Session#within_window` can be called from [Thomas Walpole]
*  Switched from `mime-types` dependency to `mini_mime` [Jason Frey]

# Version 2.14.4

Release date: 2017-06-27

### Fixed

* Fix retrieval of session_options for HaveSelector matcher descriptions - Issue #1883

# Version 2.14.3

Release date: 2017-06-15

### Fixed

* Minitest assertions now raise the correct error type - Issue #1879 [Thomas Walpole]
* Improve flexibility of detecting Chrome headless mode [Thomas Walpole]

# Version 2.14.2

Release date: 2017-06-09

### Fixed

* Workaround for system modals when using headless Chrome now works if the page changes

# Version 2.14.1

Release date: 2017-06-07

### Fixed

* Catch correct error when unexpected system modals are discovered in latest selenium [Thomas Walpole]
* Update default `puma` server registration to encourage it to run in single mode [Thomas Walpole]
* Suppress invalid element errors raised while lazily evaluating the results of `all` [Thomas Walpole]
* Added missing `with_selected` option to the :select selector to match `options`/`with_options` options - Issue #1865 [Bartosz Nowak]
* Workaround broken system modals when using selenium with headless Chrome

# Version 2.14.0

Release date: 2017-05-01

### Added

* "threadsafe" mode that allows per-session configuration
* `:type` filter added to the `:fillable_field` selector
* Proxy methods when using RSpec for `all`/`within` that call either the Capybara::DSL or RSpec matchers
  depending on arguments passed
* Support for the new errors in selenium-webdriver 3.4

### Fixed

* Element#inspect doesn't raise an error on obsolete elements
* Setting a contenteditable element with Selenium and Chrome 59
* Workaround a hang while setting the window size when using geckodriver 0.16 and Firefox 53
* Clicking on url with a blank href goes to the current url when using the RackTest driver

# Version 2.13.0

Release date: 2017-03-16

### Added

* Selenium driver supports returning element(s) from evaluate_script [Thomas Walpole]
* rack_test driver supports click on checkboxes and radio buttons to change their states [Thomas Walpole]
* Support RSpec equivalent assertions and expectations for MiniTest [Thomas Walpole]

### Fixed

* Editing of content editable children with selenium

# Version 2.12.1

Release date: 2017-02-16

### Fixed
*  Disable lazy Capybara::Results evaluation for JRuby due to ongoing issues

# Version 2.12.0

Release date: 2017-01-22

### Added

* Session#switch_to_frame for manually handling frame switching - Issue #1365 [Thomas Walpole]
* Session#within_frame now accepts a selector type (defaults to :frame) and locator [Thomas Walpole]
* Session#execute_script and Session#evaluate_script now accept optional arguments that will be passed to the JS function.  This may not be supported
  by all drivers, and the types of arguments that may be passed is limited.  If drivers opt to support this feature they should support passing page elements. [Thomas Walpole]
* :exact option for text and title matchers - Issue #1256 [Thomas Walpole]
* :exact_text option for selector finders/minders - Issue #1256 [Thomas Walpole]
* Capybara.exact_text setting that affects the text matchers and :text options passed to selector finders/matchers. Issue #1256 [Thomas Walpole]
* :make_visible option for #attach_file that allows for convenient changing of the CSS style of a file input element before attaching the file to it.  Requires driver
  support for passing page elements to Session#execute_script [Thomas Walpole]
* assert_all_selectors/assert_none_of_selectors assertions added
* :link selector (used by find_link/click_link) now supports finding hyperlink placeholders (no href attribute) when href: nil option is specified [Thomas Walpole]
* `within_element` as an alias of `within` due to RSpec collision

### Fixed

*  Fields inside a disabled fieldset are now correctly considered disabled - Issue #1816 [Thomas Walpole]
*  Lazy Capybara::Results evaluation enabled for JRuby 9.1.6.0+
*  A driver returning nil for #current_url won't raise an exception when calling #current_path [Dylan Reichstadt]
*  Support Ruby 2.4.0 unified Integer [Koichi ITO]
*  RackTest driver no longer modifies the text content of textarea elements in order to behave more like a real browser [Thomas Walpole]
*  TextQuery (assert_text/have_text/etc) now ignores errors when trying to generate more helpful errors messages so the original error isn't hidden [Thomas Walpole]

# Version 2.11.0

Release date: 2016-12-05

### Added

* Options for clearing session/local storage on reset added to the Selenium driver
* Window size changes wait for the size to stabilize
* Defined return value for most actions
* Ignore specific error when quitting selenium driver instance - Issue #1773 [Dylan Reichstadt, Thomas Walpole]
* Warn on selenium unknown errors rather than raising when quitting driver [Adam Pohorecki, Thomas Walpole]
* Capybara::Result#each now returns an `Enumerator` when called without a block - Issue #1777 [Thomas Walpole]

### Fixed

* Selenium driver with Chrome should support multiple file upload [Thomas Walpole]
* Fix visible: :hidden with :text option behavior [Thomas Walpole]

# Version 2.10.2

Release date: 2016-11-30

### Fixed

* App exceptions with multiple parameter initializers now re-raised correctly - Issue #1785 [Michael Lutsiuk]
* Use Addressable::URI when parsing current_path since it's more lenient of technically invalid URLs - Issue #1801 [Marcos Duque, Thomas Walpole]

# Version 2.10.1

Release date: 2016-10-08

### Fixed
* App errors are now correctly raised with the explanatory cause in JRuby [Thomas Walpole]
* Capybara::Result optimization disabled in JRuby due to issue with lazy enumerator evaluation [Thomas Walpole]
  See: https://github.com/jruby/jruby/issues/4212

# Version 2.10.0

Release date: 2016-10-05

### Added

* Select `<button>` elements with descendant images with `alt` attributes matching the locator [Ian Lesperance]
* Locator string is optional in selector based matchers [Thomas Walpole]
* Selectors can specify their default visible setting [Thomas Walpole]
* Selector based finders and matchers can be passed a block to filter the results within the retry behavior [Thomas Walpole]

# Version 2.9.2

Release date: 2016-09-29

### Fixed

* :label built-in selector finds nested label/control by control id if the label has no 'for' attribute [Thomas Walpole]
* Warning issued if an unknown selector type is specified [Thomas Walpole]

# Version 2.9.1

Release date: 2016-09-23

### Fixed

* allow_label_click option did not work in some cases with Poltergeist - Issue #1762 [Thomas Walpole]
* matches_selector? should have access to all of a selectors options except the count options [Thomas Walpole]

# Version 2.9.0

Release date: 2016-09-19

### Fixed

* Issue with rack-test driver and obsolete mime-types when using `#attach_file` - Issue #1756 [Thomas Walpole]

### Added

* `:class` option to many of the built-in selectors [Thomas Walpole]
* Removed need to specify value when creating `:boolean` filter type in custom selectors [Thomas Walpole]
* Filters can now be implemented through the XPath/CSS expressions in custom selectors [Thomas Walpole]
* `Element#matches_xpath?` and `Element#matches_css?` [Thomas Walpole]

# Version 2.8.1

Release date: 2016-08-25

### Fixed

* Fixed error message from have_text when text is not found but contains regex special characters [Ryunosuke Sato]
* Warn when :exact option is passed that has no effect [Thomas Walpole]

# Version 2.8.0

Release date: 2016-08-16

### Fixed

* Issue with modals present when closing the page using selenium - Issue #1696 [Jonas Nicklas, Thomas Walpole]
* Server errors raised in test code have the cause set to an explanatory exception
  in rubies that support Exception#cause rather than a confusing ExpectationNotMet - Issue #1719 [Thomas Walpole]
* background/given/given! RSpec aliases will work if RSpec config.shared_context_metadata_behavior == :apply_to_host_groups [Thomas Walpole]
* Fixed setting of unexpectedAlertError now that Selenium will be freezing the Capabilities::DEFAULTS [Thomas Walpole]

### Added

* 'check', 'uncheck', and 'choose' can now optionally click the associated label if the checkbox/radio button is not visible [Thomas Walpole]
* Raise error if Capybara.app_host/default_host are specified incorrectly [Thomas Walpole]
* Capybara::Selector::FilterSet allows for sharing filter definitions between selectors [Thomas Walpole]
* Remove need to pass nil locator in most node actions when locator is not needed [Thomas Walpole]
* New frames API for drivers - Issue #1365 [Thomas Walpole]
* Deprecated Element#parent in favor of Element#query_scope to better indicate what it is [Thomas Walpole]
* Improved error messages for have_text matcher [Alex Chaffee, Thomas Walpole]
* The `:with` option for the field selector now accepts a regular expression for matching the field value [Uwe Kubosch]
* Support matching on aria-label attribute when finding fields/links/buttons - Issue #1528 [Thomas Walpole]
* Optimize Capybara::Result to only apply fields as necessary in common use-case of `.all[idx]` [Thomas Walpole]

# Version 2.7.1

Release date: 2016-05-01

### Fixed

* Issue where within_Frame would fail with Selenium if the frame is removed from within itself [Thomas Walpole]
* Reset sessions in reverse order so sessions with active servers are reset last - Issue #1692 [Jonas Nicklas, Thomas Walpole]

# Version 2.7.0

Release date: 2016-04-07

### Fixed

* Element#visible?/checked?/disabled?/selected? Now return boolean as expected when using the rack_test driver [Thomas Walpole]
* The rack_test driver now considers \<input type="hidden"> elements as non-visible [Thomas Walpole]
* A nil locator passed to the built-in html type selectors now behaves consistently, and finds elements of the expected types [Thomas Walpole]
* Capybara::Server now searches for available ports on the same interface it binds to [Aaron Stone]
* Selenium Driver handles system modals that appear when page is unloading [Thomas Walpole]
* Warning output if unused parameters are passed to a selector query [Thomas Walpole]

### Added

* Capybara now waits for requests to Capybaras server to complete while resetting the session [John Hawthorn, Thomas Walpole]
* Capybara.reuse_server option to allow disabling of sharing server instance between sessions [Thomas Walpole]
* :multiple filter added to relevant selectors [Thomas Walpole]
* Provided server registrations for :webrick and :puma. Capybara.server = :puma for testing with Rails 5 [Thomas Walpole]
* Deprecate passing a block to Capybara::server user Capybara::register_server instead [Thomas Walpole]
* :option selector supports :selected and :disabled filters [Thomas Walpole]
* Element#matches_selector? and associated matchers (match_selector, match_css, etc) for comparing an element to a selector [Thomas Walpole]
* Deprecated Driver#browser_initialized? - Driver#reset! is required to be synchronous [Jonas Nicklas, Thomas Walpole]
* Deprecated Capybara.save_and_open_page_path in favor of Capybara.save_path with slightly different behavior when using relative paths with
  save_page/save_screenshot [Thomas Walpole]
* :label selector [Thomas Walpole]

# Version 2.6.2

Release date: 2016-01-27

### Fixed

* support for more than just addressable 2.4.0 [Thomas Walpole]

# Version 2.6.1

Release date: 2016-01-27

### Fixed

* Add missing require for addressable [Jorge Bejar]

# Version 2.6.0

Release date: 2016-01-17

### Fixed

* Fixed path escaping issue with current_path matchers [Thomas Walpole, Luke Rollans] (Issue #1611)
* Fixed circular require [David Rodríguez]
* Capybara::RackTest::Form no longer overrides Object#method [David Rodriguez]
* options and with_options filter for :select selector have more intuitive visibility behavior [Nathan]
* Test for nested modal API method support [Thomas Walpole]


### Added

* Capybara.modify_selector [Thomas Walpole]
* xfeature and ffeature aliases added when using RSpec [Filip Bartuzi]
* Selenium driver supports a :clear option to #set to handle different strategies for clearing a field [Thomas Walpole]
* Support the use of rack 2.0 with the rack_test driver [Travis Grathwell, Thomas Walpole]
* Disabled option for default selectors now supports true, false, or :all [Jillian Rosile, Thomas Walpole]
* Modal API methods now default wait time to Capybara.default_max_wait_time [Thomas Walpole]

# Version 2.5.0

Release date: 2015-08-25

### Fixed

* Error message now raised correctly when invalid options passed to 'have_text'/'have_content' [Thomas Walpole]
* Rack-test driver correctly gets document title when elements on the page have nested title elements (SVG) [Thomas Walpole]
* 'save_page' no longer errors when using Capybara.asset_host if the page has no \<head> element [Travis Grathwell]
* rack-test driver will ignore clicks on links with href starting with '#' or 'javascript:'

### Added

* has_current_path? and associated asserts/matchers added [Thomas Walpole]
* Implement Node#path in selenium driver [Soutaro Matsumoto]
* 'using_session' is now nestable [Thomas Walpole]
* 'switch_to_window' will now use waiting behavior for a matching window to appear [Thomas Walpole]
* Warning when attempting to select a disabled option
* Capybara matchers are now available in RSpec view specs by default [Joshua Clayton]
* 'have_link' and 'click_link' now accept Regexp for href matching [Yaniv Savir]
* 'find_all' as an alias of 'all' due to collision with RSpec
* Capybara.wait_on_first_by_default setting (default is false)
  If set to true 'first' will use Capybaras waiting behavior to wait for at least one element to appear by default
* Capybara waiting behavior uses the monotonic clock if supported to ease restrictions on freezing time in tests [Dmitry Maksyoma, Thomas Walpole]
* Capybara.server_errors setting that allows to configure what type of errors will be raised from the server thread [Thomas Walpole]
* Node#send_keys to allow for sending keypresses directly to elements [Thomas Walpole]
* 'formmethod' attribute support in RackTest driver [Emilia Andrzejewska]
* Clear field using backspaces in Selenium driver by using `:fill_options => { :clear => :backspace }` [Joe Lencioni]

### Deprecated

* Capybara.default_wait_time deprecated in favor of Capybara.default_max_wait_time to more clearly explain its purpose [Paul Pettengill]

# Version 2.4.4

Release date: 2014-10-13

### Fixed

* Test for visit behavior updated [Phil Baker]
* Removed concurrency prevention in favor of a note in the README - due to load order issues

# Version 2.4.3

Release date: 2014-09-21

### Fixed

* Update concurrency prevention to match Rails 4.2 behavior

# Version 2.4.2

Release date: 2014-09-20

### Fixed

* Prevent concurrency issue when testing Rails app with default test environment [Thomas Walpole]
* Tags for windows API tests fixed [Dmitry Vorotilin]
* Documentation Fixes [Andrey Botalov]
* Always convert visit url to string, fixes issue with visit when always_include_port was enabled [Jake Goulding]
* Check correct rspec version before including ::RSpec::Matchers::Composable in Capybara RSpec matchers [Thomas Walpole, Justin Ko]

# Version 2.4.1

Release date: 2014-07-03

### Added

* 'assert_text', 'assert_no_text', 'assert_title', 'assert_no_title' methods added [Andrey Botalov]
* have_title matcher now supports :wait option [Andrey Botalov]
* More descriptive have_text error messages [Andrey Botalov]
* New modal API ('accept_alert', 'accept_confirm', 'dismiss_confirm', 'accept_prompt', 'dismiss_prompt') - [Mike Pack, Thomas Walpole]
* Warning when attempting to set contents of a readonly element
* Suport for and/or compounding of Capybara's RSpec matchers for RSpec 3 [Thomas Walpole]
* :fill_options option for 'fill_in' method that propagates to 'set' to allow for driver specific modification of how fields are filled in [Gabriel Sobrinho, Thomas Walpole]
* Improved selector/filter description in failure messages [Thomas Walpole]

### Fixed

* HaveText error message now shows the text checked all the time
* RackTest driver no longer attempts to follow an anchor tag without an href attribute
* Warnings under RSpec 3
* Handle URI schemes like about: correctly [Andrey Botalov]
* RSpecs expose_dsl_globally option is now followed [Myron Marston, Thomas Walpole]

# Version 2.3.0

Release date: 2014-06-02

### Added

* New window management API [Andrey Botalov]
* Speed improvement for visible text detection in RackTest [Thomas Walpole]
  Thanks to Phillipe Creux for instigating this
* RSpec 3 compatability
* 'save_and_open_screenshot' functionality [Greg Lazarev]
* Server errors raised on visit and synchronize [Jonas Nicklas]

### Fixed

* CSSHandlers now derives from BasicObject so globally included functions (concat, etc) shouldn't cause issues [Thomas Walpole]
* touched reset after session is reset [lesliepc16]

# Version 2.2.1

Release date: 2014-01-06

### Fixed

* Reverted a change in 2.2.0 which navigates to an empty file on `reset`.
  Capybara, now visits `about:blank` like it did before. [Jonas Nicklas]

# Version 2.2.0

Release date: 2013-11-21

### Added

* Add `go_back` and `go_forward` methods. [Vasiliy Ermolovich]
* Support RSpec 3 [Thomas Holmes]
* `has_button?`, `has_checked_field?` and `has_unchecked_field?` accept
  options, like other matchers. [Carol Nichols]
* The `assert_selector` and `has_text?` methods now support the `:wait` option
  [Vasiliy Ermolovich]
* RackTest's visible? method now checks for the HTML5 `hidden` attribute.
* Results from `#all` now delegate the `sample` method. [Phil Lee]
* The `set` method now works for contenteditable attributes under Selenium.
  [Jon Rowe]
* radio buttons and check boxes can be filtered by option value, useful when
  selecting by name [Jonas Nicklas]
* feature blocks can be nested within other feature blocks in RSpec tests
  [Travis Gaff]

### Fixed

* Fixed race conditions causing stale element errors when filtering by text.
  [Jonas Nicklas]
* Resetting the page is now synchronous and navigates to an empty HTML file,
  instead of `about:blank`, fixing hanging issues in JRuby. [Jonas Nicklas]
* Fixed cookies not being set when path is blank under RackTest [Thomas Walpole]
* Clearing fields now correctly causes change events [Jonas Nicklas]
* Navigating to an absolute URI without trailing slash now works as expected
  under RackTest [Jonas Nicklas]
* Checkboxes without assigned value default to `on` under RackTest [Nigel Sheridan-Smith]
* Clicks on buttons with no form associated with them are ignored in RackTest
  instead of raising an obscure exception. [Thomas Walpole]
* execute_script is now a session method [Andrey Botalov]
* Nesting `within_window` and `within_frame` inside `within` resets the scope
  so that they behave like a user would expect [Thomas Walpole]
* Improve handling of newlines in textareas [Thomas Walpole]
* `Capybara::Result` delegates its inspect method, so as not to confuse users
  [Sam Rawlins]
* save_page always returns a full path, fixes problems with Launchy [Jonas Nicklas]
* Selenium driver's `quit` method does nothing when browser hasn't been loaded
  [randoum]
* Capybara's WEBRick server now propertly respects the server_host option
  [Dmitry Vorotilin]
* gemspec now includes license information [Jonas Nicklas]

# Version 2.1.0

Release date: 2013-04-09

### Changed

* Hard version requirement on Ruby >= 1.9.3. Capybara will no longer install
  on 1.8.7. [Felix Schäfer]
* Capybara no longer depends on the `selenium-webdriver` gem. Add it to
  your Gemfile if you wish to use the Selenium driver. [Jonas Nicklas]
* `Capybara.ignore_hidden_elements` defaults to `true`. [Jonas Nicklas]
* In case of multiple matches `smart` matching is used by default. Set
  `Capybara.match = :one` to revert to old behaviour. [Jonas Nicklas].
* Options in select boxes use smart matching and no longer need to match
  exactly. Set `Capybara.exact_options = false` to revert to old behaviour.
  [Jonas Nicklas].
* Visibility of text depends on `Capybara.ignore_hidden_elements` instead of
  always returning only visible text. Set `Capybara.visible_text_only = true`
  to revert to old behaviour. [Jonas Nicklas]
* Cucumber cleans up session after scenario instead. This is consistent with
  RSpec and makes more sense, since we raise server errors in `reset!`.
  [Jonas Nicklas]

### Added

* All actions (`click_link`, `fill_in`, etc...) and finders now take an options
  hash, which is passed through to `find`. [Jonas Nicklas]
* CSS selectors are sent straight through to driver instead of being converted
  to XPath first. Enables the use of some pseudo selectors, such as `invalid`
  in some drivers. [Thomas Walpole]
* `Capybara.asset_host` option, which inserts a `base` tag into the page on
  `save_and_open_page`, eases debugging with the Rails asset pipeline.
  [Steve Hull]
* `exact` option, can specify whether to match substrings or entire text.
  [Jonas Nicklas]
* `match` option, can specify behaviour in case of multiple matches.
  [Jonas Nicklas]
* `wait` option, can specify how long to wait for a given action/finder.
  [Jonas Nicklas]
* Config option which disables bubbling of errors raised inside server.
  [Jonas Nicklas]
* `text` now takes a parameter which makes it possible to return either all
  text or only visible text. The default depends on
  `Capybara.ignore_hidden_elements`. `Capybara.visible_text_only` option is
  available for compatibility. [Jonas Nicklas]
* `has_content?` and `has_text?` now take the same count options as `has_selector?`
  [Andrey Botalov]
* `current_scope` is now public API, returns the current element when `within`
  is used. [Martijn Walraven]
* `find("input").disabled?` returns true if a node is disabled. [Ben Lovell]
* Find disabled fields and buttons with `:disabled => false`. [Jonas Nicklas]
* `find("input").hover` moves the mouse to the element in supported drivers.
  [Thomas Walpole]
* RackTest driver now support `form` attribute on form elements.
  [Thomas Walpole]
* `page.title` returns the page title. [Terry Progetto]
* `has_title?` matcher to assert on page title. [Jonas Nicklas]
* The gem is now signed with a certicficate. The public key is available in the
  repo. [Jonas Nicklas]
* `:select` and `:textarea` are valid options for the `:type` filter on `find_field`
  and `has_field?`. [Yann Plancqueel]

### Fixed

* Fixed race conditions when synchronizing across multiple nodes [Jonas Nicklas]
* Fixed race conditions in deeply nested selectors [Jonas Nicklas]
* Fix issue with `within_frame`, where selecting multiple nested frames didn't
  work as intended. [Thomas Walpole]
* RackTest no longer fills in readonly textareas. [Thomas Walpole]
* Don't use autoload to load files, require them directly instead. [Jonas Nicklas]
* Rescue weird exceptions when booting server [John Wilger]
* Non strings are now properly cast when using the maxlength attribute [Jonas Nicklas]

# Version 2.0.3

Release date: 2013-03-26

* Check against Rails version fixed to work with Rails' master branch now returning
  a Gem::Version [Jonas Nicklas]
* Use posix character class for whitespace replace, solves various encoding
  problems on Ruby 2.0.0 and JRuby. [Ben Cates]

# Version 2.0.2

Release date: 2012-12-31

### Changed

* Capybara no longer uses thin as a server if it is available, due to thread
  safety issues. Now Capybara always defaults to WEBrick. [Jonas Nicklas]

### Fixed

* Suppress several warnings [Kouhei Sutou]
* Fix default host becoming nil [Brian Cardarella]
* Fix regression in 2.0.1 which caused node comparisons with non node objects
  to throw an exception [Kouhei Sotou]
* A few changes to the specs, only relevant to driver authors [Jonas Nicklas]
* Encoding error under JRuby [Piotr Krawiec]
* Ruby 2 encoding fix [Murahashi Sanemat Kenichi]
* Catch correct exception on server timeout [Jonathan del Strother]

# Version 2.0.1

Release date: 2012-12-21

### Changed

* Move the RackTest driver override with the `:respect_data_method` option
  enabled from capybara/rspec to capybara/rails, so that it is enabled in
  Rails projects that don't use RSpec. [Carlos Antonio da Silva]
* `source` is now an alias for `html`. RackTest no longer returns modifications
  to `html`. This basically codifies the behaviour which we've had for a while
  anyway, and should have minimal impact for end users. For driver authors, it
  means that they only have to implement `html`, and not `source`. [Jonas
  Nicklas]

### Fixed

* Visiting relative URLs when `app_host` is set and no server is running works
  as expected. [Jonas Nicklas]
* `fill_in` works properly under Selenium again when the caret is not at the
  end of the field before the method is called. [Douwe Maan, Jonas Nicklas, Jari
  Bakken]
* `attach_file` can once again be given a Pathname [Jake Goulding]

# Version 2.0.0

Release date: 2012-11-05

### Changed

* Dropped official support for Ruby 1.8.x. [Jonas Nicklas]
* `respect_data_method` default to `false` for the RackTest driver in non-rails
  applications. That means that Capybara no longer picks up `data-method="post"`
  et. al. from links by default when you haven't required capybara/rails
  [Jonas Nicklas]
* `find` now raises an error if more than one element was found. Since `find` is
  used by most actions, like `click_link` under the surface, this means that all
  actions need to unambiguous in the future. [Jonas Nicklas]
* All methods which find or manipulate fields or buttons now ignore them when
  they are disabled. [Jonas Nicklas]
* Can no longer find elements by id via `find(:foo)`, use `find("#foo")` or
  `find_by_id("foo")` instead. [Jonas Nicklas]
* `Element#text` on RackTest now only returns visible text and normalizes
  (strips) whitespace, as with Selenium [Mark Dodwell, Jo Liss]
* `has_content?` now checks the text value returned by `Element#text`, as opposed to
  querying the DOM. Which means it does not match hidden text.
  [Ryan Montgomery, Mark Dodwell, Jo Liss]
* #394: `#body` now returns the unmodified source (like `#source`), not the current
  state of the DOM (like `#html`), by popular request [Jonas Nicklas]
* `Node#all` no longer returns an array, but rather an enumerable `Capybara::Result`
  [Jonas Nicklas]
* The arguments to `select` and `unselect` needs to be the exact text of an option
  in a select box, substrings are no longer allowed [Jonas Nicklas]
* The `options` option to `has_select?` must match the exact set of options. Use
  `with_options` for the old behaviour. [Gonzalo Rodriguez]
* The `selected` option to `has_select?` must match all selected options for multiple
  selects. [Gonzalo Rodriguez]
* Various internals for running driver specs, this should only affect driver authors
  [Jonas Nicklas]
* Rename `Driver#body` to `Driver#html` (relevant only for driver authors) [Jo
  Liss]

### Removed

* No longer possible to specify `failure_message` for custom selectors. [Jonas Nicklas]
* #589: `Capybara.server_boot_timeout` has been removed in favor of a higher
  (60-second) hard-coded timeout [Jo Liss]
* `Capybara.prefer_visible_elements` has been removed, as it is no longer needed
  with the changed find semantics [Jonas Nicklas]
* `Node#wait_until` and `Session#wait_until` have been removed. See `Node#synchronize`
  for an alternative [Jonas Nicklas]
* `Capybara.timeout` has been removed [Jonas Nicklas]
* The `:resynchronize` option has been removed from the Selenium driver [Jonas Nicklas]
* The `rows` option to `has_table?` has been removed without replacement.
  [Jonas Nicklas]

### Added

* Much improved error message [Jonas Nicklas]
* Errors from inside the session for apps running in a server are raised when
  session is reset [James Tucker, Jonas Nicklas]
* A ton of new selectors built in out of the box, like `field`, `link`, `button`,
  etc... [Adam McCrea, Jonas Nicklas]
* `has_text?` has been added as an alias for `has_content?` [Jonas Nicklas]
* Add `Capybara.server_host` option (default: 127.0.0.1) [David Balatero]
* Add `:type` option for `page.has_field?` [Gonzalo Rodríguez]
* Custom matchers can now be specified in CSS in addition to XPath [Jonas Nicklas]
* `Node#synchronize` method to rerun a block of code if certain errors are raised
  [Jonas Nicklas]
* `Capybara.always_include_port` config option always includes the server port in
  URLs when using `visit`. Facilitates testing different domain names. [Douwe Maan]
* Redirect limit for RackTest driver is configurable [Josh Lane]
* Server port can be manually specified during initialization of server.
  [Jonas Nicklas, John Wilger]
* `has_content?` and `has_text?` can be given a regular expression [Vasiliy Ermolovich]
* Multiple files can be uploaded with `attach_file` [Jarl Friis]

### Fixed

* Nodes found via `all` are no longer reloaded. This fixes weird quirks where
  nodes would seemingly randomly replace themselves with other nodes [Jonas Nicklas]
* Session is only reset if it has been modified, dramatically improves performance if
  only part of the test suite runs Capybara. [Jonas Nicklas]
* Test suite now passes on Ruby 1.8 [Jo Liss]
* #565: `require 'capybara/dsl'` is no longer necessary [Jo Liss]
* `Rack::Test` now respects ports when changing hosts [Jo Liss]
* #603: `Rack::Test` now preserves the original referer URL when following a
  redirect [Rob van Dijk]
* Rack::Test now does not send a referer when calling `visit` multiple times
  [Jo Liss]
* Exceptions during server boot now propagate to main thread [James Tucker]
* RSpec integration now cleans up before the test instead of after [Darwin]
* If `respect_data_method` is true, the data-method attribute can be capitalized
  [Marco Antonio]
* Rack app boot timing out raises an error as opposed to just logging to STDOUT
  [Adrian Irving-Beer]
* `#source` returns an empty string instead of nil if no pages have been visited
  [Jonas Nicklas]
* Ignore first leading newline in textareas in RackTest [Vitalii Khustochka]
* `within_frame` returns the value of the given block [Alistair Hutchison]
* Running `Node.set` on text fields will not trigger more than one change event
  [Andrew Kasper]
* Throw an error when an option is given to a finder method, like `all` or
  `has_selector?` which Capybara doesn't understand [Jonas Nicklas]
* Two references to the node now register as equal when comparing them with `==`
  [Jonas Nicklas]
* `has_text` (`has_content`) now accepts non-string arguments, like numbers.
  [Jo Liss]
* `has_text` and `text` now correctly normalize Unicode whitespace, such as
  `&nbsp;`. [Jo Liss]
* RackTest allows protocol relative URLs [Jonas Nicklas]
* Arguments are cast to string where necessary, so that e.g. `click_link(:foo)` works
  as expected. [Jonas Nicklas]
* `:count => 0` now works as expected [Jarl Friis]
* Fixed race conditions on negative assertions when removing nodes [Jonas Nicklas]

# Version 1.1.4

Release date: 2012-11-28

### Fixed

* Fix more race conditions on negative assertions. [Jonas Nicklas]

# Version 1.1.3

Release date: 2012-10-30

### Fixed:

* RackTest driver ignores leading newline in textareas, this is consistent with
  the spec and how browsers behave. [Vitalii Khustochka]
* Nodes found via `all` and `first` are never reloaded. This fixes issues where
  a node would sometimes magically turn into a completely different node.
  [Jonas Nicklas]
* Fix race conditions on negative assertions. This fixes issues where removing
  an element and asserting on its non existence could cause
  StaleElementReferenceError and similar to be thrown. [Jonas Nicklas]
* Options are no longer lost when reloading elements. This fixes issues where
  reloading an element would cause a non-matching element to be found, because
  options to `find` were ignored. [Jonas Nicklas]

# Version 1.1.2

Release date: 2011-11-15

### Fixed

* #541: Make attach_file work with selenium-webdriver >=2.12 [Jonas Nicklas]

# Version 1.1.0

Release date: 2011-09-02

### Fixed

* Sensible inspect for Capybara::Session [Jo Liss]
* Fix headers and host on redirect [Matt Colyer, Jonas Nicklas, Kim Burgestrand]
* using_driver now restores the old driver instead of reverting to the default [Carol Nichols]
* Errors when following links relative to the root path under rack-test [Jonas Nicklas, Kim Burgestrand]
* Make sure exit codes are propagated properly [Edgar Beigarts]

### Changed

* resynchronization is off by default under Selenium

### Added

* Elements are automatically reloaded (including parents) during wait [Jonas Nicklas]
* Rescue driver specific element errors, such as the dreaded ObsoleteElementError and retry [Jonas Nicklas]
* Raise an error if something has frozen time [Jonas Nicklas]
* Allow within to take a node instead of a selector [Peter Williams]
* Using wait_time_time to change wait time for a block of code [Jonas Nicklas, Kim Burgestrand]
* Option for rack-test driver to disable data-method hack [Jonas Nicklas, Kim Burgestrand]

# Version 1.0.1

Release date: 2011-08-12

### Fixed

* Dependend on selenium-webdriver ~>2.0 and fix deprecations [Thomas Walpole, Jo Liss]
* Depend on Launch 2.0 [Jeremy Hinegardner]
* Rack-Test ignores fill in on fields with maxlength=""

# Version 1.0.0

Release date: 2011-06-14

### Added

* Added DSL for acceptance tests, inspired by Luismi Cavallé's Steak [Luismi Cavalle and Jonas Nicklas]
* Selenium driver automatically waits for AJAX requests to finish [mgiambalvo, Nicklas Ramhöj and Jonas Nicklas]
* Support for switching between multiple named sessions [Tristan Dunn]
* failure_message can be specified for Selectors [Jonas Nicklas]
* RSpec matchers [David Chelimsky and Jonas Nicklas]
* Added save_page to save tempfile without opening in browser [Jeff Kreeftmeijer]
* Cucumber now switches automatically to a registered driver if the tag matches the name [Jonas Nicklas]
* Added Session#text [Jonas Nicklas and Scott Cytacki]
* Added Session#html as an alias for Session#body [Jo Liss]
* Added Session#current_host method [Jonas Nicklas]
* Buttons can now be clicked by title [Javier Martin]
* :headers option for RackTest driver to set custom HTTP headers [Jonas Nicklas]

### Removed

* Culerity and Celerity drivers have been removed and split into separate gems [Gabriel Sobrinho]

### Deprecated

* `include Capybara` has been deprecated in favour of `include Capybara::DSL` [Jonas Nicklas]

### Changed

* Rack test driver class has been renamed from Capybara::Driver::RackTest to Capybara::RackTest::Driver [Jonas Nicklas]
* Selenium driver class has been renamed from Capybara::Driver::Selenium to Capybara::Selenium::Driver [Jonas Nicklas]
* Capybara now prefers visible elements over hidden elements, disable by setting Capybara.prefer_visible_elements = false [Jonas Nicklas and Nicklas Ramhöj]
* For RSpec, :type => :request is now supported (and preferred over :acceptance) [Jo Liss]
* Selenium driver tried to wait for AJAX requests to finish before proceeding [Jonas Nicklas and Nicklas Ramhöj]
* Session no longer uses method missing, uses explicit delegates instead [Jonas Nicklas]

### Fixed

* The Rack::Test driver now respects maxlength on text fields [Guilherme Carvalho]
* Allow for more than one save_and_open_page call per second [Jo Liss]
* Automatically convert options to :count, :minimum, :maximum, etc. to integers [Keith Marcum]
* Rack::Test driver honours maxlength on input fields [Guilherme Carvalho]
* Rack::Test now works as expected with domains and subdomains [Jonas Nicklas]
* Session is reset more thoroughly between tests. [Jonas Nicklas]
* Raise error when uploading non-existent file [Jonas Nicklas]
* Rack response body should respond to #each [Piotr Sarnacki]
* Deprecation warnings with selenium webdriver 0.2.0 [Aaron Gibraltar]
* Selenium Chrome no longer YELLS tagname [Carl Jackson & David W. Frank]
* Capybara no longer strips encoding before sending to Rack [Jonas Nicklas]
* Improve handling of relative URLs [John Barton]
* Readd and fix build_rack_mock_session [Jonas Nicklas, Jon Leighton]

# Version 0.4.1

Release date: 2011-01-21

### Added

* New click_on alias for click_link_or_button, shorter yet unambiguous. [Jonas Nicklas]
* Finders now accept :visible => false which will find all elements regardless of Capybara.ignore_hidden_elements [Jonas Nicklas]
* Configure how the server is started via Capybara.server { |app, port| ... }. [John Firebough]
* Added :between, :maximum and :minimum options to has_selector and friends [James B. Byrne]
* New Capybara.string util function which allows matchers on arbitrary strings, mostly for helper and view specs [David Chelimsky and Jonas Nicklas]
* Server boot timeout is now configurable, via Capybara.server_boot_timeout [Adam Cigánek]
* Built in support for RSpec [Jonas Nicklas]
* Capybara.using_driver to switch to a different driver temporarily [Jeff Kreeftmeijer]
* Added Session#first which is somewhat speedier than Session#all, use it internally for speed boost [John Firebaugh]

### Changed

* Session#within now accepts the same arguments as other finders, like Session#all and Session#find [Jonas Nicklas]

### Removed

* All deprecations from 0.4.0 have been removed. [Jonas Nicklas]

### Fixed

* Don't mangle URLs in save_and_open_page when using self-closing tags [Adam Spiers]
* Catch correct error when server boot times out [Jonas Nicklas]
* Celerity driver now properly passes through options, making it configurable [Jonas Nicklas]
* Better implementation of attributes in C[ue]lerity, should fix issues with attributes with strange names [Jonas Nicklas]
* Session#find no longer swallows errors [Jonas Nicklas]
* Fix problems with multiple file inputs [Philip Arndt]
* Submit multipart forms as multipart under rack-test even if they contain no files [Ryan Kinderman]
* Matchers like has_select? and has_checked_field? now work with dynamically changed values [John Firebaugh]
* Preserve order of rack params [Joel Chippindale]
* RackTest#reset! is more thorough [Joel Chippindale]

# Version 0.4.0

Release date: 2010-10-22

### Changed

* The Selector API was changed slightly, use Capybara.add_selector, see README

### Fixed

* Celerity driver is registered properly
* has_selector? and has_no_selector? added to DSL
* Multiple selects return correct values under C[cu]lerity
* Naked query strings are handled correctly by rack-test

# Version 0.4.0.rc

Release date: 2010-10-12

### Changed

* within and find/locate now follow the XPath spec in that //foo finds all nodes in the document, instead of
  only for the context node. See this post for details: http://groups.google.com/group/ruby-capybara/browse_thread/thread/b129067979df21b3
* within now executes within the first found instance of the selector, not in all of them
* find now waits for AJAX requests and raises an exception when the element is not found (same as locate used to do)
* The default selector is now CSS, not XPath

### Deprecated

* Session#click has been renamed click_link_or_button and the old click has been deprecated
* Node#node has been renamed native
* Node#locate is deprecated in favor of Node#find, which now behaves identically
* Session#drag is deprecated, please use Node#drag_to(other_node) instead

### Added

* Pretty much everything is properly documented now
* It's now possible to call all session methods on nodes, like `find('#foo').fill_in(...)`
* Custom selectors can be added with Capybara::Selector.add
* The :id selector is added by default, use it lile `find(:id, 'foo')` or `find(:foo)`
* Added Node#has_selector? so any kind of selector can be queried.
* Added Capybara.configure for less wordy configuration
* Added within_window to switch between different windows (currently Selenium only)
* Capybara.server_port to provide a fixed port if wanted (defaults to automatic selection)

### Fixed

* CSS selectors with multiple selectors, such as "h1, h2" now work correctly
* Port is automatically assigned instead of guessing
* Strip encodings in rack-test, no more warnings!
* RackTest no longer submits disabled fields
* Servers no longer output annoying debug information when started
* TCP port selection is left to Ruby to decide, no more port guessing
* Select boxes now return option value instead of text if present
* The default has been changed from localhost to 127.0.0.1, should fix some obscure selenium bugs
* RackTest now supports complex field names, such as foo[bar][][baz]

# Version 0.3.9

Release date: 2010-07-03

### Added

* status_code which returns the HTTP status code of the last response (no Selenium!)
* Capybara.save_and_open_page to store tempfiles
* RackTest and Culerity drivers now clean up after themselves properly

### Fixed

* When no rack app is set and the app is called, a more descriptive error is raised
* select now works with optgroups
* Don't submit image buttons unless they were clicked under rack-test
* Support custom field types under Selenium
* Support input fields without a type, treat them as though they were text fields
* Redirect now throws an error after 5 redirects, as per RFC
* Selenium now properly raises an error when Node#trigger is called
* Node#value now returns the correct value for textareas under rack-test

# Version 0.3.8

Release date: 2010-05-12

### Added

* Within_frame method to execute a block of code within a particular iframe (Selenium only!)

### Fixed

* Single quotes are properly escaped with `select` under rack-test and Selenium.
* The :text option for searches now escapes regexp special characters when a string is given.
* Selenium now correctly checks already checked checkboxes (same with uncheck)
* Timing issue which caused Selenium to hang under certain circumstances.
* Selenium now resolves attributes even if they are given as a Symbol

# Version 0.3.7

Release date: 2010-04-09

This is a drop in compatible maintenance release. It's mostly
important for driver authors.

### Added

* RackTest scans for data-method which rails3 uses to change the request method

### Fixed

* Don't hang when starting server on Windoze

### Changed

* The driver and session specs are now located inside lib! Driver authors can simply require them.

# Version 0.3.6

Release date: 2010-03-22

This is a maintenance release with minor bug fixes, should be
drop in compatible.

### Added

* It's now possible to load in external drivers

### Fixed

* has_content? ignores whitespace
* Trigger events when choosing radios and checking checkboxes under Selenium
* Make Capybara.app totally optional when running without server
* Changed fallback host so it matches the one set up by Rails' integration tests

# Version 0.3.5

Release date: 2010-02-26

This is a mostly backwards compatible release, it does break
the API in some minor places, which should hopefully not affect
too many users, please read the release notes carefully!

### Breaking

* Relative searching in a node (e.g. find('//p').all('//a')) will now follow XPath standard
  this means that if you want to find descendant nodes only, you'll need to prefix a dot!
* `visit` now accepts fully qualified URLs for drivers that support it.
* Capybara will always try to run a rack server, unless you set Capybara.run_sever = false

### Changed

* thin is preferred over mongrel and webrick, since it is Ruby 1.9 compatible
* click_button and click will find <input type="button">, clicking them does nothing in RackTest

### Added

* Much improved error messages in a multitude of places
* More semantic page querying with has_link?, has_button?, etc...
* Option to ignore hidden elements when querying and interacting with the page
* Support for multiple selects

### Fixed

* find_by_id is no longer broken
* clicking links where the image's alt attribute contains the text is now possible
* within_fieldset and within_table work when the default selector is CSS
* boolean attributes work the same across drivers (return true/false)


================================================
FILE: License.txt
================================================
(The MIT License)

Copyright (c) 2009-2018 Thomas Walpole, Jonas Nicklas

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: README.md
================================================
# Capybara

[![Build Status](https://github.com/teamcapybara/capybara/actions/workflows/build.yml/badge.svg)](https://github.com/teamcapybara/capybara/actions/workflows/build.yml)
[![Code Climate](https://codeclimate.com/github/teamcapybara/capybara.svg)](https://codeclimate.com/github/teamcapybara/capybara)
[![Coverage Status](https://coveralls.io/repos/github/teamcapybara/capybara/badge.svg?branch=master)](https://coveralls.io/github/teamcapybara/capybara?branch=master)

Capybara helps you test web applications by simulating how a real user would
interact with your app. It is agnostic about the driver running your tests and
comes with Rack::Test and Selenium support built in. WebKit is supported
through an external gem.

## Support Capybara

If you and/or your company find value in Capybara and would like to contribute financially to its ongoing maintenance and development, please visit
<a href="https://www.patreon.com/capybara">Patreon</a>


**Need help?** Ask on the discussions (please do not open an issue): https://github.com/orgs/teamcapybara/discussions/categories/q-a

## Table of contents

- [Key benefits](#key-benefits)
- [Setup](#setup)
- [Using Capybara with Cucumber](#using-capybara-with-cucumber)
- [Using Capybara with RSpec](#using-capybara-with-rspec)
- [Using Capybara with Test::Unit](#using-capybara-with-testunit)
- [Using Capybara with Minitest](#using-capybara-with-minitest)
- [Using Capybara with Minitest::Spec](#using-capybara-with-minitestspec)
- [Drivers](#drivers)
    - [Selecting the Driver](#selecting-the-driver)
    - [RackTest](#racktest)
    - [Selenium](#selenium)
- [The DSL](#the-dsl)
    - [Navigating](#navigating)
    - [Clicking links and buttons](#clicking-links-and-buttons)
    - [Interacting with forms](#interacting-with-forms)
    - [Querying](#querying)
    - [Finding](#finding)
    - [Scoping](#scoping)
    - [Working with windows](#working-with-windows)
    - [Scripting](#scripting)
    - [Modals](#modals)
    - [Debugging](#debugging)
- [Selectors](#selectors)
    - [Name](#selectors-name)
    - [Locator](#selectors-locator)
    - [Filters](#selectors-filters)
- [Matching](#matching)
    - [Exactness](#exactness)
    - [Strategy](#strategy)
- [Transactions and database setup](#transactions-and-database-setup)
- [Asynchronous JavaScript (Ajax and friends)](#asynchronous-javascript-ajax-and-friends)
- [Using the DSL elsewhere](#using-the-dsl-elsewhere)
- [Calling remote servers](#calling-remote-servers)
- [Using sessions](#using-sessions)
    - [Named sessions](#named-sessions)
    - [Using sessions manually](#using-sessions-manually)
- [XPath, CSS and selectors](#xpath-css-and-selectors)
- [Beware the XPath // trap](#beware-the-xpath--trap)
- [Configuring and adding drivers](#configuring-and-adding-drivers)
- [Gotchas:](#gotchas)
- ["Threadsafe" mode](#threadsafe-mode)
- [Development](#development)

## <a name="key-benefits"></a>Key benefits

- **No setup** necessary for Rails and Rack application. Works out of the box.
- **Intuitive API** which mimics the language an actual user would use.
- **Switch the backend** your tests run against from fast headless mode
  to an actual browser with no changes to your tests.
- **Powerful synchronization** features mean you never have to manually wait
  for asynchronous processes to complete.

## <a name="setup"></a>Setup

Capybara requires Ruby 3.0.0 or later. To install, add this line to your
`Gemfile` and run `bundle install`:

```ruby
gem 'capybara'
```

If the application that you are testing is a Rails app, add this line to your test helper file:

```ruby
require 'capybara/rails'
```

If the application that you are testing is a Rack app, but not Rails, set Capybara.app to your Rack app:

```ruby
Capybara.app = MyRackApp
```

If you need to test JavaScript, or if your app interacts with (or is located at)
a remote URL, you'll need to [use a different driver](#drivers).  If using Rails 5.0+, but not using the Rails system tests from 5.1, you'll probably also
want to swap the "server" used to launch your app to Puma in order to match Rails defaults.

```ruby
Capybara.server = :puma # Until your setup is working
Capybara.server = :puma, { Silent: true } # To clean up your test output
```

## <a name="using-capybara-with-cucumber"></a>Using Capybara with Cucumber

The `cucumber-rails` gem comes with Capybara support built-in. If you
are not using Rails, manually load the `capybara/cucumber` module:

```ruby
require 'capybara/cucumber'
Capybara.app = MyRackApp
```

You can use the Capybara DSL in your steps, like so:

```ruby
When /I sign in/ do
  within("#session") do
    fill_in 'Email', with: 'user@example.com'
    fill_in 'Password', with: 'password'
  end
  click_button 'Sign in'
end
```

You can switch to the `Capybara.javascript_driver` (`:selenium`
by default) by tagging scenarios (or features) with `@javascript`:

```ruby
@javascript
Scenario: do something Ajaxy
  When I click the Ajax link
  ...
```

There are also explicit tags for each registered driver set up for you (`@selenium`, `@rack_test`, etc).

## <a name="using-capybara-with-rspec"></a>Using Capybara with RSpec

Load RSpec 3.5+ support by adding the following line (typically to your
`spec_helper.rb` file):

```ruby
require 'capybara/rspec'
```

If you are using Rails, put your Capybara specs in `spec/features` or `spec/system` (only works if
[you have it configured in RSpec](https://rspec.info/features/6-0/rspec-rails/directory-structure/))
and if you have your Capybara specs in a different directory, then tag the example groups with
`type: :feature` or `type: :system` depending on which type of test you're writing.

If you are using Rails system specs please see [their documentation](https://rspec.info/features/6-0/rspec-rails/system-specs/system-specs)
for selecting the driver you wish to use.

If you are not using Rails, tag all the example groups in which you want to use
Capybara with `type: :feature`.

You can now write your specs like so:

```ruby
describe "the signin process", type: :feature do
  before :each do
    User.create(email: 'user@example.com', password: 'password')
  end

  it "signs me in" do
    visit '/sessions/new'
    within("#session") do
      fill_in 'Email', with: 'user@example.com'
      fill_in 'Password', with: 'password'
    end
    click_button 'Sign in'
    expect(page).to have_content 'Success'
  end
end
```

Use `js: true` to switch to the `Capybara.javascript_driver`
(`:selenium` by default), or provide a `:driver` option to switch
to one specific driver. For example:

```ruby
describe 'some stuff which requires js', js: true do
  it 'will use the default js driver'
  it 'will switch to one specific driver', driver: :selenium
end
```

Capybara also comes with a built in DSL for creating descriptive acceptance tests:

```ruby
feature "Signing in" do
  background do
    User.create(email: 'user@example.com', password: 'caplin')
  end

  scenario "Signing in with correct credentials" do
    visit '/sessions/new'
    within("#session") do
      fill_in 'Email', with: 'user@example.com'
      fill_in 'Password', with: 'caplin'
    end
    click_button 'Sign in'
    expect(page).to have_content 'Success'
  end

  given(:other_user) { User.create(email: 'other@example.com', password: 'rous') }

  scenario "Signing in as another user" do
    visit '/sessions/new'
    within("#session") do
      fill_in 'Email', with: other_user.email
      fill_in 'Password', with: other_user.password
    end
    click_button 'Sign in'
    expect(page).to have_content 'Invalid email or password'
  end
end
```

`feature` is in fact just an alias for `describe ..., type: :feature`,
`background` is an alias for `before`, `scenario` for `it`, and
`given`/`given!` aliases for `let`/`let!`, respectively.

Finally, Capybara matchers are also supported in view specs:

```ruby
RSpec.describe "todos/show.html.erb", type: :view do
  it "displays the todo title" do
    assign :todo, Todo.new(title: "Buy milk")

    render

    expect(rendered).to have_css("header h1", text: "Buy milk")
  end
end
```

**Note: When you require 'capybara/rspec' proxy methods are installed to work around name collisions between Capybara::DSL methods
  `all`/`within` and the identically named built-in RSpec matchers. If you opt not to require 'capybara/rspec' you can install the proxy methods by requiring 'capybara/rspec/matcher_proxies' after requiring RSpec and 'capybara/dsl'**

## <a name="using-capybara-with-testunit"></a>Using Capybara with Test::Unit

* If you are using `Test::Unit`, define a base class for your Capybara tests
  like so:

    ```ruby
    require 'capybara/dsl'

    class CapybaraTestCase < Test::Unit::TestCase
      include Capybara::DSL

      def teardown
        Capybara.reset_sessions!
        Capybara.use_default_driver
      end
    end
    ```

## <a name="using-capybara-with-minitest"></a>Using Capybara with Minitest

* If you are using Rails system tests please see their documentation for information on selecting the driver you wish to use.

* If you are using Rails, but not using Rails system tests, add the following code in your `test_helper.rb`
    file to make Capybara available in all test cases deriving from
    `ActionDispatch::IntegrationTest`:

    ```ruby
    require 'capybara/rails'
    require 'capybara/minitest'

    class ActionDispatch::IntegrationTest
      # Make the Capybara DSL available in all integration tests
      include Capybara::DSL
      # Make `assert_*` methods behave like Minitest assertions
      include Capybara::Minitest::Assertions

      # Reset sessions and driver between tests
      teardown do
        Capybara.reset_sessions!
        Capybara.use_default_driver
      end
    end
    ```

* If you are not using Rails, define a base class for your Capybara tests like
  so:

    ```ruby
    require 'capybara/minitest'

    class CapybaraTestCase < Minitest::Test
      include Capybara::DSL
      include Capybara::Minitest::Assertions

      def teardown
        Capybara.reset_sessions!
        Capybara.use_default_driver
      end
    end
    ```

    Remember to call `super` in any subclasses that override
    `teardown`.

To switch the driver, set `Capybara.current_driver`. For instance,

```ruby
class BlogTest < ActionDispatch::IntegrationTest
  setup do
    Capybara.current_driver = Capybara.javascript_driver # :selenium by default
  end

  test 'shows blog posts' do
    # ... this test is run with Selenium ...
  end
end
```

## <a name="using-capybara-with-minitestspec"></a>Using Capybara with Minitest::Spec

Follow the above instructions for Minitest and additionally require capybara/minitest/spec

```ruby
page.must_have_content('Important!')
```

## <a name="drivers"></a>Drivers

Capybara uses the same DSL to drive a variety of browser and headless drivers.

### <a name="selecting-the-driver"></a>Selecting the Driver

By default, Capybara uses the `:rack_test` driver, which is fast but limited: it
does not support JavaScript, nor is it able to access HTTP resources outside of
your Rack application, such as remote APIs and OAuth services. To get around
these limitations, you can set up a different default driver for your features.
For example, if you'd prefer to run everything in Selenium, you could do:

```ruby
Capybara.default_driver = :selenium # :selenium_chrome and :selenium_chrome_headless are also registered
```

However, if you are using RSpec or Cucumber (and your app runs correctly without JS),
you may instead want to consider leaving the faster `:rack_test` as the __default_driver__, and
marking only those tests that require a JavaScript-capable driver using `js: true` or
`@javascript`, respectively.  By default, JavaScript tests are run using the
`:selenium` driver. You can change this by setting
`Capybara.javascript_driver`.

You can also change the driver temporarily (typically in the Before/setup and
After/teardown blocks):

```ruby
Capybara.current_driver = :selenium # temporarily select different driver
# tests here
Capybara.use_default_driver       # switch back to default driver
```

**Note**: switching the driver creates a new session, so you may not be able to
switch in the middle of a test.

### <a name="racktest"></a>RackTest

RackTest is Capybara's default driver. It is written in pure Ruby and does not
have any support for executing JavaScript. Since the RackTest driver interacts
directly with Rack interfaces, it does not require a server to be started.
However, this means that if your application is not a Rack application (Rails,
Sinatra and most other Ruby frameworks are Rack applications) then you cannot
use this driver. Furthermore, you cannot use the RackTest driver to test a
remote application, or to access remote URLs (e.g., redirects to external
sites, external APIs, or OAuth services) that your application might interact
with.

[capybara-mechanize](https://github.com/jeroenvandijk/capybara-mechanize)
provides a similar driver that can access remote servers.

RackTest can be configured with a set of headers like this:

```ruby
Capybara.register_driver :rack_test do |app|
  Capybara::RackTest::Driver.new(app, headers: { 'HTTP_USER_AGENT' => 'Capybara' })
end
```

See the section on adding and configuring drivers.

### <a name="selenium"></a>Selenium

Capybara supports [Selenium 3.5+
(Webdriver)](https://www.seleniumhq.org/projects/webdriver/).
In order to use Selenium, you'll need to install the `selenium-webdriver` gem,
and add it to your Gemfile if you're using bundler.

Capybara pre-registers a number of named drivers that use Selenium - they are:

  * :selenium                 => Selenium driving Firefox
  * :selenium_headless        => Selenium driving Firefox in a headless configuration
  * :selenium_chrome          => Selenium driving Chrome
  * :selenium_chrome_headless => Selenium driving Chrome in a headless configuration

These should work (with relevant software installation) in a local desktop configuration but you may
need to customize them if using in a CI environment where additional options may need to be passed
to the browsers.  See the section on adding and configuring drivers.


**Note**: drivers which run the server in a different thread may not share the
same transaction as your tests, causing data not to be shared between your test
and test server, see [Transactions and database setup](#transactions-and-database-setup) below.

## <a name="the-dsl"></a>The DSL

*A complete reference is available at
[rubydoc.info](http://rubydoc.info/github/teamcapybara/capybara/master)*.

**Note: By default Capybara will only locate visible elements. This is because
 a real user would not be able to interact with non-visible elements.**

**Note**: All searches in Capybara are *case sensitive*. This is because
Capybara heavily uses XPath, which doesn't support case insensitivity.

### <a name="navigating"></a>Navigating

You can use the
<tt>[visit](http://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Session#visit-instance_method)</tt>
method to navigate to other pages:

```ruby
visit('/projects')
visit(post_comments_path(post))
```

The visit method only takes a single parameter, the request method is **always**
GET.

You can get the [current path](http://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Session#current_path-instance_method)
of the browsing session, and test it using the [`have_current_path`](http://www.rubydoc.info/github/teamcapybara/capybara/master/Capybara/RSpecMatchers#have_current_path-instance_method) matcher:

```ruby
expect(page).to have_current_path(post_comments_path(post))
```

**Note**: You can also assert the current path by testing the value of
`current_path` directly. However, using the `have_current_path` matcher is
safer since it uses Capybara's [waiting behaviour](#asynchronous-javascript-ajax-and-friends)
to ensure that preceding actions (such as a `click_link`) have completed.

### <a name="clicking-links-and-buttons"></a>Clicking links and buttons

*Full reference: [Capybara::Node::Actions](http://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Actions)*

You can interact with the webapp by following links and buttons. Capybara
automatically follows any redirects, and submits forms associated with buttons.

```ruby
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click_on('Link Text') # clicks on either links or buttons
click_on('Button Value')
```

### <a name="interacting-with-forms"></a>Interacting with forms

*Full reference: [Capybara::Node::Actions](http://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Actions)*

There are a number of tools for interacting with form elements:

```ruby
fill_in('First Name', with: 'John')
fill_in('Password', with: 'Seekrit')
fill_in('Description', with: 'Really Long Text...')
choose('A Radio Button')
check('A Checkbox')
uncheck('A Checkbox')
attach_file('Image', '/path/to/image.jpg')
select('Option', from: 'Select Box')
```

### <a name="querying"></a>Querying

*Full reference: [Capybara::Node::Matchers](http://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Matchers)*

Capybara has a rich set of options for querying the page for the existence of
certain elements, and working with and manipulating those elements.

```ruby
page.has_selector?('table tr')
page.has_selector?(:xpath, './/table/tr')

page.has_xpath?('.//table/tr')
page.has_css?('table tr.foo')
page.has_content?('foo')
```

**Note:** The negative forms like `has_no_selector?` are different from `not
has_selector?`. Read the section on asynchronous JavaScript for an explanation.

You can use these with RSpec's magic matchers:

```ruby
expect(page).to have_selector('table tr')
expect(page).to have_selector(:xpath, './/table/tr')

expect(page).to have_xpath('.//table/tr')
expect(page).to have_css('table tr.foo')
expect(page).to have_content('foo')
```

### <a name="finding"></a>Finding

_Full reference: [Capybara::Node::Finders](http://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Finders)_

You can also find specific elements, in order to manipulate them:

```ruby
find_field('First Name').value
find_field(id: 'my_field').value
find_link('Hello', :visible => :all).visible?
find_link(class: ['some_class', 'some_other_class'], :visible => :all).visible?

find_button('Send').click
find_button(value: '1234').click

find(:xpath, ".//table/tr").click
find("#overlay").find("h1").click
all('a').each { |a| a[:href] }
```

If you need to find elements by additional attributes/properties you can also pass a filter block, which will be checked inside the normal waiting behavior.
If you find yourself needing to use this a lot you may be better off adding a [custom selector](http://www.rubydoc.info/github/teamcapybara/capybara/Capybara#add_selector-class_method) or [adding a filter to an existing selector](http://www.rubydoc.info/github/teamcapybara/capybara/Capybara#modify_selector-class_method).

```ruby
find_field('First Name'){ |el| el['data-xyz'] == '123' }
find("#img_loading"){ |img| img['complete'] == true }
```

**Note**: `find` will wait for an element to appear on the page, as explained in the
Ajax section. If the element does not appear it will raise an error.

These elements all have all the Capybara DSL methods available, so you can restrict them
to specific parts of the page:

```ruby
find('#navigation').click_link('Home')
expect(find('#navigation')).to have_button('Sign out')
```

### <a name="scoping"></a>Scoping

Capybara makes it possible to restrict certain actions, such as interacting with
forms or clicking links and buttons, to within a specific area of the page. For
this purpose you can use the generic
<tt>[within](http://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Session#within-instance_method)</tt>
method. Optionally you can specify which kind of selector to use.

```ruby
within("li#employee") do
  fill_in 'Name', with: 'Jimmy'
end

within(:xpath, ".//li[@id='employee']") do
  fill_in 'Name', with: 'Jimmy'
end
```

There are special methods for restricting the scope to a specific fieldset,
identified by either an id or the text of the fieldset's legend tag, and to a
specific table, identified by either id or text of the table's caption tag.

```ruby
within_fieldset('Employee') do
  fill_in 'Name', with: 'Jimmy'
end

within_table('Employee') do
  fill_in 'Name', with: 'Jimmy'
end
```

### <a name="working-with-windows"></a>Working with windows

Capybara provides some methods to ease finding and switching windows:

```ruby
facebook_window = window_opened_by do
  click_button 'Like'
end
within_window facebook_window do
  find('#login_email').set('a@example.com')
  find('#login_password').set('qwerty')
  click_button 'Submit'
end
```

### <a name="scripting"></a>Scripting

In drivers which support it, you can easily execute JavaScript:

```ruby
page.execute_script("$('body').empty()")
```

For simple expressions, you can return the result of the script.

```ruby
result = page.evaluate_script('4 + 4');
```

For more complicated scripts you'll need to write them as one expression.

```ruby
result = page.evaluate_script(<<~JS, 3, element)
  (function(n, el){
    var val = parseInt(el.value, 10);
    return n+val;
  })(arguments[0], arguments[1])
JS
```

### <a name="modals"></a>Modals

In drivers which support it, you can accept, dismiss and respond to alerts, confirms, and prompts.

You can accept alert messages by wrapping the code that produces an alert in a block:

```ruby
accept_alert 'optional text or regex' do
  click_link('Show Alert')
end
```

You can accept or dismiss a confirmation by wrapping it in a block, as well:

```ruby
accept_confirm 'optional text' do
  click_link('Show Confirm')
end
```

```ruby
dismiss_confirm 'optional text' do
  click_link('Show Confirm')
end
```

You can accept or dismiss prompts as well, and also provide text to fill in for the response:

```ruby
accept_prompt('optional text', with: 'Linus Torvalds') do
  click_link('Show Prompt About Linux')
end
```

```ruby
dismiss_prompt('optional text') do
  click_link('Show Prompt About Linux')
end
```

All modal methods return the message that was presented. So, you can access the prompt message
by assigning the return to a variable:

```ruby
message = accept_prompt(with: 'Linus Torvalds') do
  click_link('Show Prompt About Linux')
end
expect(message).to eq('Who is the chief architect of Linux?')
```

### <a name="debugging"></a>Debugging

It can be useful to take a snapshot of the page as it currently is and take a
look at it:

```ruby
save_and_open_page
```

You can also retrieve the current state of the DOM as a string using
<tt>[page.html](http://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Session#html-instance_method)</tt>.

```ruby
print page.html
```

This is mostly useful for debugging. You should avoid testing against the
contents of `page.html` and use the more expressive finder methods instead.

Finally, in drivers that support it, you can save a screenshot:

```ruby
page.save_screenshot('screenshot.png')
```

Or have it save and automatically open:

```ruby
save_and_open_screenshot
```

Screenshots are saved to `Capybara.save_path`, relative to the app directory.
If you have required `capybara/rails`, `Capybara.save_path` will default to
`tmp/capybara`.

## <a name="selectors"></a>Selectors

Helpers and matchers that accept Selectors share a common method signature that
includes:

1. a positional Name argument
2. a positional Locator argument
3. keyword Filter arguments
4. a predicate Filter block argument

These arguments are usually optional in one way or another.

### <a name="selectors-name"></a>Name

The name argument determines the Selector to use. The argument is optional when
a helper explicitly conveys the selector name (for example, [`find_field`][]
uses `:field`, [`find_link`][] uses `:link`, etc):

```ruby
page.html # => '<a href="/">Home</a>'

page.find(:link) == page.find_link

page.html # => '<input>'

page.find(:field) == page.find_field
```

### <a name="selectors-locator"></a>Locator

The locator argument usually represents information that can most meaningfully
distinguish an element that matches the selector from an element that does not:

```ruby
page.html # => '<div id="greeting">Hello world</div>'

page.find(:css, 'div').text     # => 'Hello world'
page.find(:xpath, './/div').text # => 'Hello world'
```

General purpose finder methods like [`find`][] and [`all`][] can accept the
locator as their first positional argument when the method can infer the default
value from the [`Capybara.default_selector`][] configuration:

```ruby
page.html # => '<div id="greeting">Hello world</div>'

Capybara.default_selector = :css

page.find('div').text     # => 'Hello world'

Capybara.default_selector = :xpath

page.find('.//div').text # => 'Hello world'
```

The locator argument's semantics are context-specific, and depend on the
selector. The types of arguments are varied. Some selectors support `String` or
`Regexp` arguments, while others like `:table_row` support `Array<String>` and
`Hash<String, String>`:

```ruby
page.html # => '<label for="greeting">Greeting</label>
          #     <input id="greeting" name="content">'

# find by the <input> element's [id] attribute
page.find(:id, 'greeting') == page.find_by_id('greeting') # => true

# find by the <input> element's [id] attribute
page.find(:field, 'greeting') == page.find_field('greeting') # => true

# find by the <input> element's [name] attribute
page.find(:field, 'content') == page.find_field('content') # => true

# find by the <label> element's text
page.find(:field, 'Greeting') == page.find_field('Greeting') # => true

page.html # => '<table>
          #       <tr>
          #         <th>A</th>
          #         <th>B</th>
          #       </tr>
          #       <tr>
          #         <td>1</td>
          #         <td>2</td>
          #       </tr>
          #     </table>'

# find by <td> content
page.find(:table_row, ['1', '2']) == page.find(:css, 'tr:last-of-type') # => true

# find by <th> content paired with corresponding <td> content
page.find(:table_row, 'A' => '1') == page.find(:table_row, 'B' => '2') # => true
```

### <a name="selectors-filters"></a> Filters

All filters are optional. The supported set of keys is a mixture of both global
and context-specific filters.The supported types of values depend on the
context:

```ruby
page.html # => '<a href="/">Home</a>'

# find by the [href] attribute
page.find_link(href: '/') == page.find_link(text: 'Home') # => true

page.html # => '<div id="element" data-attribute="value">Content</div>'

# find by the [id] attribute
page.find(id: 'element') == page.find(text: 'Content') # => true

# find by the [data-attribute] attribute
page.find(:element, 'data-attribute': /value/) == page.find(text: 'Content') # => true

page.html # => '<input type="checkbox">'

# find by the absence of the [checked] attribute
page.find_field(checked: false) == page.find_field(unchecked: true) # => true
```

The predicate block is always optional. When there are results for a selector
query, the block is called with each item in the result set. When the block
evaluates to true, the item is included from the result set. Otherwise, the item
is excluded:

```ruby
page.html # => '<input role="switch" type="checkbox" checked>'

switch = page.find_field { |input| input["role"] == "switch" }
field = page.find_field(checked: true)

switch == field # => true
```

[`find`]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Finders:find
[`all`]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Finders:all
[`Capybara.default_selector`]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara%2Econfigure
[`find_by_id`]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Finders:find_by_id
[`find_field`]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Finders:find_field
[`find_link`]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Finders:find_link

## <a name="matching"></a>Matching

It is possible to customize how Capybara finds elements. At your disposal
are two options, `Capybara.exact` and `Capybara.match`.

### <a name="exactness"></a>Exactness

`Capybara.exact` and the `exact` option work together with the `is` expression
inside the XPath gem. When `exact` is true, all `is` expressions match exactly,
when it is false, they allow substring matches. Many of the selectors built into
Capybara use the `is` expression. This way you can specify whether you want to
allow substring matches or not. `Capybara.exact` is false by default.

For example:

```ruby
click_link("Password") # also matches "Password confirmation"
Capybara.exact = true
click_link("Password") # does not match "Password confirmation"
click_link("Password", exact: false) # can be overridden
```

### <a name="strategy"></a>Strategy

Using `Capybara.match` and the equivalent `match` option, you can control how
Capybara behaves when multiple elements all match a query. There are currently
four different strategies built into Capybara:

1. **first:** Just picks the first element that matches.
2. **one:** Raises an error if more than one element matches.
3. **smart:** If `exact` is `true`, raises an error if more than one element
   matches, just like `one`. If `exact` is `false`, it will first try to find
   an exact match. An error is raised if more than one element is found. If no
   element is found, a new search is performed which allows partial matches. If
   that search returns multiple matches, an error is raised.
4. **prefer_exact:** If multiple matches are found, some of which are exact,
   and some of which are not, then the first exactly matching element is
   returned.

The default for `Capybara.match` is `:smart`. To emulate the behaviour in
Capybara 2.0.x, set `Capybara.match` to `:one`. To emulate the behaviour in
Capybara 1.x, set `Capybara.match` to `:prefer_exact`.

## <a name="transactions-and-database-setup"></a>Transactions and database setup

**Note:**  Rails 5.1+ "safely" shares the database connection between the app and test threads.  Therefore,
if using Rails 5.1+ you SHOULD be able to ignore this section.

Some Capybara drivers need to run against an actual HTTP server. Capybara takes
care of this and starts one for you in the same process as your test, but on
another thread. Selenium is one of those drivers, whereas RackTest is not.

If you are using a SQL database, it is common to run every test in a
transaction, which is rolled back at the end of the test, rspec-rails does this
by default out of the box for example. Since transactions are usually not
shared across threads, this will cause data you have put into the database in
your test code to be invisible to Capybara.

Cucumber handles this by using truncation instead of transactions, i.e. they
empty out the entire database after each test. You can get the same behaviour
by using a gem such as [database_cleaner](https://github.com/DatabaseCleaner/database_cleaner).

## <a name="asynchronous-javascript-ajax-and-friends"></a>Asynchronous JavaScript (Ajax and friends)

When working with asynchronous JavaScript, you might come across situations
where you are attempting to interact with an element which is not yet present
on the page. Capybara automatically deals with this by waiting for elements
to appear on the page.

When issuing instructions to the DSL such as:

```ruby
click_link('foo')
click_link('bar')
expect(page).to have_content('baz')
```

If clicking on the *foo* link triggers an asynchronous process, such as
an Ajax request, which, when complete will add the *bar* link to the page,
clicking on the *bar* link would be expected to fail, since that link doesn't
exist yet. However, Capybara is smart enough to retry finding the link for a
brief period of time before giving up and throwing an error. The same is true of
the next line, which looks for the content *baz* on the page; it will retry
looking for that content for a brief time. You can adjust how long this period
is (the default is 2 seconds):

```ruby
Capybara.default_max_wait_time = 5
```

Be aware that because of this behaviour, the following two statements are **not**
equivalent, and you should **always** use the latter!

```ruby
# Given use of a driver where the page is loaded when visit returns
# and that Capybara.predicates_wait is `true`
# consider a page where the `a` tag is removed through AJAX after 1s
visit(some_path)
!page.has_xpath?('a')  # is false
page.has_no_xpath?('a')  # is true
```

First expression:
- `has_xpath?('a')` is called right after `visit` returns. It is `true` because the link has not yet been removed
- Capybara does not wait upon successful predicates/assertions, therefore **has_xpath? returns `true` immediately**
- The expression returns `false` (because it is negated with the leading `!`)

Second expression:
- `has_no_xpath?('a')` is called right after `visit` returns. It is `false` because the link has not yet been removed.
- Capybara waits upon failed predicates/assertions, therefore **has_no_xpath? does not return `false` immediately**
- Capybara will periodically re-check the predicate/assertion up to the `default_max_wait_time` defined
- after 1s, the predicate becomes `true` (because the link has been removed)
- The expression returns `true`

Capybara's RSpec matchers, however, are smart enough to handle either form.
The two following statements are functionally equivalent:

```ruby
expect(page).not_to have_xpath('a')
expect(page).to have_no_xpath('a')
```

Capybara's waiting behaviour is quite advanced, and can deal with situations
such as the following line of code:

```ruby
expect(find('#sidebar').find('h1')).to have_content('Something')
```

Even if JavaScript causes `#sidebar` to disappear off the page, Capybara
will automatically reload it and any elements it contains. So if an AJAX
request causes the contents of `#sidebar` to change, which would update
the text of the `h1` to "Something", and this happened, this test would
pass. If you do not want this behaviour, you can set
`Capybara.automatic_reload` to `false`.

## <a name="using-the-dsl-elsewhere"></a>Using the DSL elsewhere

You can mix the DSL into any context by including <tt>Capybara::DSL</tt>:


```ruby
require 'capybara/dsl'

Capybara.default_driver = :webkit

module MyModule
  include Capybara::DSL

  def login!
    within(:xpath, ".//form[@id='session']") do
      fill_in 'Email', with: 'user@example.com'
      fill_in 'Password', with: 'password'
    end
    click_button 'Sign in'
  end
end
```

This enables its use in unsupported testing frameworks, and for general-purpose scripting.

## <a name="calling-remote-servers"></a>Calling remote servers

Normally Capybara expects to be testing an in-process Rack application, but you
can also use it to talk to a web server running anywhere on the internet, by
setting app_host:

```ruby
Capybara.current_driver = :selenium
Capybara.app_host = 'http://www.google.com'
...
visit('/')
```

**Note**: the default driver (`:rack_test`) does not support running
against a remote server. With drivers that support it, you can also visit any
URL directly:

```ruby
visit('http://www.google.com')
```

By default Capybara will try to boot a rack application automatically. You
might want to switch off Capybara's rack server if you are running against a
remote application:

```ruby
Capybara.run_server = false
```

## <a name="using-sessions"></a>Using sessions

Capybara manages named sessions (:default if not specified) allowing multiple sessions using the same driver and test app instance to be interacted with.
A new session will be created using the current driver if a session with the given name using the current driver and test app instance is not found.

### Named sessions
To perform operations in a different session and then revert to the previous session

```ruby
Capybara.using_session("Bob's session") do
   #do something in Bob's browser session
end
 #reverts to previous session
```

To permanently switch the current session to a different session

```ruby
Capybara.session_name = "some other session"
```

### <a name="using-sessions-manually"></a>Using sessions manually

For ultimate control, you can instantiate and use a
[Session](http://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Session)
manually.

```ruby
require 'capybara'

session = Capybara::Session.new(:webkit, my_rack_app)
session.within("form#session") do
  session.fill_in 'Email', with: 'user@example.com'
  session.fill_in 'Password', with: 'password'
end
session.click_button 'Sign in'
```

## <a name="xpath-css-and-selectors"></a>XPath, CSS and selectors

Capybara does not try to guess what kind of selector you are going to give it,
and will always use CSS by default.  If you want to use XPath, you'll need to
do:

```ruby
within(:xpath, './/ul/li') { ... }
find(:xpath, './/ul/li').text
find(:xpath, './/li[contains(.//a[@href = "#"]/text(), "foo")]').value
```

Alternatively you can set the default selector to XPath:

```ruby
Capybara.default_selector = :xpath
find('.//ul/li').text
```

Capybara provides a number of other built-in selector types. The full list, along
with applicable filters, can be seen at [built-in selectors](https://www.rubydoc.info/github/teamcapybara/capybara/Capybara/Selector)

Capybara also allows you to add custom selectors, which can be very useful if you
find yourself using the same kinds of selectors very often. The examples below are very
simple, and there are many available features not demonstrated. For more in-depth examples
please see Capybaras built-in selector definitions.

```ruby
Capybara.add_selector(:my_attribute) do
  xpath { |id| XPath.descendant[XPath.attr(:my_attribute) == id.to_s] }
end

Capybara.add_selector(:row) do
  xpath { |num| ".//tbody/tr[#{num}]" }
end

Capybara.add_selector(:flash_type) do
  css { |type| "#flash.#{type}" }
end
```

The block given to xpath must always return an XPath expression as a String, or
an XPath expression generated through the XPath gem. You can now use these
selectors like this:

```ruby
find(:my_attribute, 'post_123') # find element with matching attribute
find(:row, 3) # find 3rd row in table body
find(:flash_type, :notice) # find element with id of 'flash' and class of 'notice'
```

## <a name="beware-the-xpath--trap"></a>Beware the XPath // trap

In XPath the expression // means something very specific, and it might not be what
you think. Contrary to common belief, // means "anywhere in the document" not "anywhere
in the current context". As an example:

```ruby
page.find(:xpath, '//body').all(:xpath, '//script')
```

You might expect this to find all script tags in the body, but actually, it finds all
script tags in the entire document, not only those in the body! What you're looking
for is the .// expression which means "any descendant of the current node":

```ruby
page.find(:xpath, '//body').all(:xpath, './/script')
```
The same thing goes for within:

```ruby
within(:xpath, '//body') do
  page.find(:xpath, './/script')
  within(:xpath, './/table/tbody') do
  ...
  end
end
```

## <a name="configuring-and-adding-drivers"></a>Configuring and adding drivers

Capybara makes it convenient to switch between different drivers. It also exposes
an API to tweak those drivers with whatever settings you want, or to add your own
drivers. This is how to override the selenium driver configuration to use chrome:

```ruby
Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
```

However, it's also possible to give this configuration a different name.

```ruby
# Note: Capybara registers this by default
Capybara.register_driver :selenium_chrome do |app|
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
```

Then tests can switch between using different browsers effortlessly:
```ruby
Capybara.current_driver = :selenium_chrome
```

Whatever is returned from the block should conform to the API described by
Capybara::Driver::Base, it does not however have to inherit from this class.
Gems can use this API to add their own drivers to Capybara.

The [Selenium wiki](https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings) has
additional info about how the underlying driver can be configured.

## <a name="gotchas"></a>Gotchas:

* Access to session and request is not possible from the test, Access to
  response is limited. Some drivers allow access to response headers and HTTP
  status code, but this kind of functionality is not provided by some drivers,
  such as Selenium.

* Access to Rails specific stuff (such as `controller`) is unavailable,
  since we're not using Rails' integration testing.

* Freezing time: It's common practice to mock out the Time so that features
  that depend on the current Date work as expected. This can be problematic on
  ruby/platform combinations that don't support access to a monotonic process clock,
  since Capybara's Ajax timing uses the system time, resulting in Capybara
  never timing out and just hanging when a failure occurs. It's still possible to
  use gems which allow you to travel in time, rather than freeze time.
  One such gem is [Timecop](https://github.com/travisjeffery/timecop).

* When using Rack::Test, beware if attempting to visit absolute URLs. For
  example, a session might not be shared between visits to `posts_path`
  and `posts_url`. If testing an absolute URL in an Action Mailer email,
  set `default_url_options` to match the Rails default of
  `www.example.com`.

* Server errors will only be raised in the session that initiates the server thread. If you
  are testing for specific server errors and using multiple sessions make sure to test for the
  errors using the initial session (usually :default)

* If WebMock is enabled, you may encounter a "Too many open files"
  error. A simple `page.find` call may cause thousands of HTTP requests
  until the timeout occurs. By default, WebMock will cause each of these
  requests to spawn a new connection. To work around this problem, you
  may need to [enable WebMock's `net_http_connect_on_start: true`
  parameter](https://github.com/bblimke/webmock/blob/master/README.md#connecting-on-nethttpstart).

## <a name="threadsafe"></a>"Threadsafe" mode

In normal mode most of Capybara's configuration options are global settings which can cause issues
if using multiple sessions and wanting to change a setting for only one of the sessions.  To provide
support for this type of usage Capybara now provides a "threadsafe" mode which can be enabled by setting

```ruby
Capybara.threadsafe = true
```

This setting can only be changed before any sessions have been created.  In "threadsafe" mode the following
behaviors of Capybara change

* Most options can now be set on a session.  These can either be set at session creation time or after, and
  default to the global options at the time of session creation.  Options which are NOT session specific are
  `app`, `reuse_server`, `default_driver`, `javascript_driver`, and (obviously) `threadsafe`.  Any drivers and servers
  registered through `register_driver` and `register_server` are also global.

  ```ruby
  my_session = Capybara::Session.new(:driver, some_app) do |config|
    config.automatic_label_click = true # only set for my_session
  end
  my_session.config.default_max_wait_time = 10 # only set for my_session
  Capybara.default_max_wait_time = 2 # will not change the default_max_wait in my_session
  ```

* `current_driver` and `session_name` are thread specific.  This means that `using_session` and
  `using_driver` also only affect the current thread.

## <a name="development"></a>Development

To set up a development environment, simply do:

```bash
bundle install
bundle exec rake  # run the test suite with Firefox - requires `geckodriver` to be installed
bundle exec rake spec_chrome # run the test suite with Chrome - require `chromedriver` to be installed
```

See
[CONTRIBUTING.md](https://github.com/teamcapybara/capybara/blob/master/CONTRIBUTING.md)
for how to send issues and pull requests.


================================================
FILE: Rakefile
================================================
# frozen_string_literal: true

require 'rubygems'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
require 'yard'
require 'rubocop/rake_task'

RuboCop::RakeTask.new

desc 'Run all examples with Firefox'

rspec_opts = '--color'

RSpec::Core::RakeTask.new(:spec_firefox) do |t|
  t.rspec_opts = rspec_opts
  t.pattern = './spec{,/*/**}/*{_spec.rb,_spec_firefox.rb}'
end

%w[chrome ie edge chrome_remote firefox_remote safari].each do |driver|
  desc "Run tests using #{driver} driver"
  RSpec::Core::RakeTask.new(:"spec_#{driver}") do |t|
    t.rspec_opts = rspec_opts
    t.pattern = "./spec/{selenium_spec_#{driver}.rb}"
  end
end

RSpec::Core::RakeTask.new(:spec_sauce) do |t|
  t.rspec_opts = rspec_opts
  t.pattern = './spec/sauce_spec_chrome.rb'
end

# RSpec::Core::RakeTask.new(:spec_rack, [] => :rubocop) do |t|
RSpec::Core::RakeTask.new(:spec_rack) do |t|
  t.rspec_opts = rspec_opts
  t.pattern = './spec{,/*/**}/*{_spec.rb}'
end

desc 'Run specs with Firefox'
task spec: [:spec_firefox]

desc 'Run basic smoke tests (rack test and rubocop)'
task rack_smoke: %i[rubocop spec_rack]

YARD::Rake::YardocTask.new do |t|
  t.files   = ['lib/**/*.rb']
end

Cucumber::Rake::Task.new(:cucumber) do |task|
  task.cucumber_opts = ['--format=progress', '--publish-quiet', 'features']
end

desc 'Task for running CI'
task :travis do
  if ENV.fetch('CAPYBARA_REMOTE', nil) && ENV.fetch('CAPYBARA_FF', nil)
    Rake::Task[:spec_firefox_remote].invoke
  elsif ENV.fetch('CAPYBARA_FF', nil)
    Rake::Task[:spec_firefox].invoke
  elsif ENV.fetch('CAPYBARA_IE', nil)
    Rake::Task[:spec_ie].invoke
  elsif ENV.fetch('CAPYBARA_EDGE', nil)
    Rake::Task[:spec_edge].invoke
  elsif ENV.fetch('CAPYBARA_REMOTE', nil)
    Rake::Task[:spec_chrome_remote].invoke
  else
    Rake::Task[:spec_chrome].invoke
  end
  Rake::Task[:cucumber].invoke
end

desc 'Build updated JS replacements for Selenium atoms'
task :build_js do
  require 'uglifier'
  Dir.glob('./lib/capybara/selenium/atoms/src/*.js').each do |fn|
    js = Uglifier.compile(
      File.read(fn),
      compress: {
        negate_iife: false, # Negate immediately invoked function expressions to avoid extra parens
        side_effects: false # Pass false to disable potentially dropping functions marked as "pure"
      }
    )[0...-1]
    File.write("./lib/capybara/selenium/atoms/#{File.basename(fn).gsub('.js', '.min.js')}", js)
  end
end

desc 'Release new version'
task :release do
  version = Capybara::VERSION
  puts "Releasing #{version}, y/n?"
  exit(1) unless $stdin.gets.chomp == 'y'
  sh "git commit -am 'tagged #{version}' && " \
     "git tag #{version} && " \
     'gem build capybara.gemspec && ' \
     "gem push capybara-#{version}.gem && " \
     'git push && ' \
     'git push --tags'
end

task default: %i[spec cucumber]


================================================
FILE: UPGRADING.md
================================================
# Upgrading from Capybara 2.x to 3.x

## Server

Capybara 3 changes the default server to <a href="https://github.com/puma/puma">Puma</a>. If you do not use `Puma` in your project you can
revert to the previous default of WEBRick by specifying

```ruby
Capybara.server = :webrick
```

## Finders

The biggest user differences between Capybara 2.x and 3.x are the changes in behavior of `first` and `all`. In Capybara 2.x both methods would, by default, return immediately with nil if no matching elements exist on the page.  In Capybara 3.x this has changed to include the waiting/retrying behavior found in the other Capybara finders and matchers.

`first` will now wait up to `Capybara.default_max_wait_time` seconds for at least one matching element to exist, and return the first matching element.  If no matching elements are found within the time it will now raise a `Capybara::ElementNotFound` error instead of returning nil. If you need to maintain the previous behavior you can pass `minimum: 0` as an option to `first`

```ruby
first('div', minimum: 0)
```

`all` will now wait up to `Capybara.default_max_wait_time` seconds for at least one matching element to exist, and return the matching elements.  If no matching elements are found within the time it will return an empty result set.  If you need to maintain the previous behavior you can pass `wait: false` as an option to `all`

```ruby
all('div', wait: false)
```

## Node

`Node#text` no longer fully normalizes whitespace, instead returning text as close as possible to "as rendered". This means non-blanking spaces will no longer be collapsed, carriage returns may be returned in text strings, etc.  This affects not only the `Node#text` method but also methods that take a `:text` option as well as the text related predicates, assertions, and matchers (`has_text?`, `has_content?`, `assert_text`, `have_text`, etc.).


================================================
FILE: appveyor.yml.outdated
================================================
version: 1.0.{build}-{branch}

cache:
  - vendor/bundle

# image: Visual Studio 2017

environment:
  matrix:
    - RUBY_VERSION: 26
      CAPYBARA_FF: true
    - RUBY_VERSION: 25
      CAPYBARA_IE: true
      BUNDLE_GEMFILE: gemfiles/Gemfile.ie
    - RUBY_VERSION: 24

matrix:
  allow_failures:
    - CAPYBARA_IE: true
    - CAPYBARA_EDGE: true

init:
  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/set-screenresolution.ps1'))
  - ps: Set-ScreenResolution 1600 1200
  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

install:
  - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
  - cinst Firefox GoogleChrome
  # Registry hack so driver can maintain connection
  - REG ADD "HKLM\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BFCACHE" /v iexplore.exe /t REG_DWORD /d 00000000
  - REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BFCACHE" /v iexplore.exe /t REG_DWORD /d 00000000
  - bundle config --local path vendor/bundle
  - bundle install

build: off

before_test:
  # - ps: Invoke-WebRequest 'https://github.com/SeleniumHQ/selenium/raw/master/cpp/prebuilt/Win32/Release/IEDriverServer.exe' -OutFile 'C:\Tools\WebDriver\IEDriverServer.exe'
  - ruby -v
  - gem -v
  - bundle -v
  # - chromedriver.exe --version
  # - geckodriver.exe --version
  # - IEDriverServer.exe --version

test_script:
  - bundle exec rake travis

================================================
FILE: capybara.gemspec
================================================
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$:.unshift lib unless $:.include?(lib)

require 'capybara/version'

Gem::Specification.new do |s|
  s.name = 'capybara'
  s.version = Capybara::VERSION
  s.required_ruby_version = '>= 3.2.0'
  s.license = 'MIT'

  s.authors = ['Thomas Walpole', 'Jonas Nicklas']
  s.email = ['twalpole@gmail.com', 'jonas.nicklas@gmail.com']
  s.description = 'Capybara is an integration testing tool for rack based web applications. ' \
                  'It simulates how a user would interact with a website'

  # Test files are included in the gem to allow third-party driver packages to
  # run the Capybara test suite and ensure compatibility.
  s.files = Dir.glob('{lib,spec}/**/*') + %w[README.md History.md License.txt .yardopts]

  s.homepage = 'https://github.com/teamcapybara/capybara'
  s.metadata = {
    'changelog_uri' => 'https://github.com/teamcapybara/capybara/blob/master/History.md',
    'source_code_uri' => 'https://github.com/teamcapybara/capybara',
    'rubygems_mfa_required' => 'true'
  }
  s.require_paths = ['lib']
  s.summary = 'Capybara aims to simplify the process of integration testing Rack applications, ' \
              'such as Rails, Sinatra or Merb'

  s.add_runtime_dependency('addressable')
  s.add_runtime_dependency('matrix')
  s.add_runtime_dependency('mini_mime', ['>= 0.1.3'])
  s.add_runtime_dependency('nokogiri', ['~> 1.11'])
  s.add_runtime_dependency('rack', ['>= 1.6.0'])
  s.add_runtime_dependency('rack-test', ['>= 0.6.3'])
  s.add_runtime_dependency('regexp_parser', ['>=1.5', '<3.0'])
  s.add_runtime_dependency('xpath', ['~>3.2'])

  s.add_development_dependency('byebug') unless RUBY_PLATFORM == 'java'
  s.add_development_dependency('coveralls')
  s.add_development_dependency('cucumber', ['>= 2.3.0'])
  s.add_development_dependency('erubi') # dependency specification needed by rbx
  s.add_development_dependency('irb')
  s.add_development_dependency('launchy', ['>= 2.0.4'])
  s.add_development_dependency('minitest')
  s.add_development_dependency('puma')
  s.add_development_dependency('rackup')
  s.add_development_dependency('rake')
  s.add_development_dependency('rspec', ['>= 3.5.0'])
  s.add_development_dependency('rspec-instafail')
  s.add_development_dependency('rubocop', ['~>1.1'])
  s.add_development_dependency('rubocop-capybara')
  s.add_development_dependency('rubocop-minitest')
  s.add_development_dependency('rubocop-performance')
  s.add_development_dependency('rubocop-rake')
  s.add_development_dependency('rubocop-rspec', ['~>3.0'])
  s.add_development_dependency('sauce_whisk')
  s.add_development_dependency('selenium_statistics')
  s.add_development_dependency('selenium-webdriver', ['~>4.8'])
  s.add_development_dependency('sinatra', ['>= 1.4.0'])
  s.add_development_dependency('uglifier')
  s.add_development_dependency('yard', ['>= 0.9.0'])

  if RUBY_ENGINE == 'rbx'
    s.add_development_dependency('json')
    s.add_development_dependency('racc')
    s.add_development_dependency('rubysl')
  end

  if File.exist?('gem-private_key.pem')
    s.signing_key = 'gem-private_key.pem'
    s.cert_chain = ['gem-public_cert.pem']
  end
end


================================================
FILE: docker-compose.yml
================================================
version: "3"
services:
  selenium_chrome:
    network_mode: "host"
    image: "selenium/${SELENIUM_IMAGE:-standalone-chrome}"
    volumes:
      - "/dev/shm:/dev/shm"
  selenium_firefox:
    network_mode: "host"
    image: "selenium/${SELENIUM_IMAGE:-standalone-firefox}"
    volumes:
      - "/dev/shm:/dev/shm"
    environment:
      - SE_OPTS=-port 4445


================================================
FILE: features/capybara.feature
================================================
Feature: Capybara's cucumber integration
  In order to integrate with the lovely plain text testing framework
  As Capybara
  I want to integrate successfully with Cucumber

  Scenario: hello world
    When I visit the root page
    Then I should see "Hello world!"

  @javascript
  Scenario: javascript tag should use Capybara.javascript_driver
    When I visit the root page
    Then Capybara should use the "javascript_test" driver

  @named_test
  Scenario: named driver tag
    When I visit the root page
    Then Capybara should use the "named_test" driver

  @named_test
  Scenario Outline: selenium tag with scenario outline
    When I visit the <Page> page
    Then Capybara should use the "named_test" driver

    Examples:
      | Page |
      | root |
      | home |

  Scenario: matchers
    When I visit the root page
    And I use a matcher that fails
    Then the failing exception should be nice


================================================
FILE: features/named_driver_feature.feature
================================================
@named_test
Feature: an entire feature that uses a driver by tag

  Scenario: should use the named driver without being explicitly told
    Then Capybara should use the "named_test" driver


================================================
FILE: features/step_definitions/capybara_steps.rb
================================================
# frozen_string_literal: true

When(/^I visit the (?:root|home) page$/) do
  visit('/')
end

Then(/^I should see "([^"]*)"$/) do |text|
  expect(page).to have_content(text)
end

Then(/^Capybara should use the "([^"]*)" driver$/) do |driver|
  expect(Capybara.current_driver).to eq(driver.to_sym)
end

When(/^I use a matcher that fails$/) do
  expect(page).to have_css('h1#doesnotexist')
rescue StandardError, RSpec::Expectations::ExpectationNotMetError => e
  @error_message = e.message
end

Then(/^the failing exception should be nice$/) do
  expect(@error_message).to match(/expected to find css "h1#doesnotexist"/)
end


================================================
FILE: features/support/env.rb
================================================
# frozen_string_literal: true

require 'rubygems'
require 'bundler/setup'

require 'capybara/cucumber'
require 'capybara/spec/test_app'

Capybara.app = TestApp

# These drivers are only used for testing driver switching.
# They don't actually need to process javascript so use RackTest

Capybara.register_driver :javascript_test do |app|
  Capybara::RackTest::Driver.new(app)
end

Capybara.javascript_driver = :javascript_test

Capybara.register_driver :named_test do |app|
  Capybara::RackTest::Driver.new(app)
end


================================================
FILE: gem-public_cert.pem
================================================
-----BEGIN CERTIFICATE-----
MIIDPDCCAiSgAwIBAgIBADANBgkqhkiG9w0BAQUFADBEMRYwFAYDVQQDDA1qb25h
cy5uaWNrbGFzMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
FgNjb20wHhcNMTMwMjE1MjE1NTM2WhcNMTQwMjE1MjE1NTM2WjBEMRYwFAYDVQQD
DA1qb25hcy5uaWNrbGFzMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJ
k/IsZAEZFgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDb9AZj
gNdUKIEFktnRTerfYsCqpAFY97qtTbruj4uEKJeyHRLR4FM3sUe4N6Yb48a3JLpA
HQ1ELh5cSdJdyx8TEXmKscrqEcc2lXSgbkoFpyo6IAcEOSpC9vlAeyGpwkKI/+bP
bWw3jV236q0Cr7aFMH6nmUvJJsadOwNyUYZWATqOt6X3QoLiEphf7SwhLzAZJr6f
HhvjJ0Xo2y/LiJj9N0goOhUL6tC5ws5j4wxP8Z+YFY0Q7x7Q6RQBWcCUhc/GAWex
0eXRj2QOTzVrrIOnPN1jqifnqqU30YoMFMh/e6o3x/ziYMn7zAbFXSbtXDKCK4BT
3zGZgCiuecspHy9/AgMBAAGjOTA3MAkGA1UdEwQCMAAwHQYDVR0OBBYEFPb8+DY0
fm9BZldc/eaKZxfI6XucMAsGA1UdDwQEAwIEsDANBgkqhkiG9w0BAQUFAAOCAQEA
JtZrjd9Ds5rcBVP2L9vEa6F2oseq7ye8bavQo9Uh81fDCbVdnaZPhyMth5QhdIBL
pG+uafCMAfgU0vQeNXnAzIxmltnP4+e3IwR0Oe21eUD6lSPSvCoIaQ2eDVxoHPPJ
5NrJKxj2uuNV1yGLmVhXUFET0OkVvBgdxNmtbE2rRbxXjv5xqW6nBsgVAz0qSxB3
9yDTZKW7++Em+yFufMlDr7+1rl8cTxv1Kj43Geu5LVz7n/lHYKAdje4uJ3eBtagI
dwCI6mleXOr4MSRezf19ZUFr0CqlFcrpBSyOakStQLM8La3EAmhOEUa2UE2FIgq5
R1SH1ni+3bH7B4tAkbWskg==
-----END CERTIFICATE-----


================================================
FILE: gemfiles/Gemfile.base-versions
================================================
source 'https://rubygems.org'

gem 'bundler', '< 3.0'
gemspec path: '..'

gem 'rack', '~>2.0.0'
gem 'nokogiri', '~>1.11.0'
gem 'xpath', '~>3.2.0'
gem 'rspec', '~>3.5.0'
gem 'selenium-webdriver', '~>4.11.0'
gem 'irb', '~>1.1.1'


================================================
FILE: gemfiles/Gemfile.beta-versions
================================================
source "https://rubygems.org"

gem 'bundler', '< 3.0'
gemspec path: '..'

gem 'pkg-config' # needed by nokogiri
gem 'xpath', github: 'teamcapybara/xpath'
gem 'rack', github: 'rack/rack'
gem 'sinatra', github: 'sinatra/sinatra', branch: 'master'
gem 'rspec', github: 'rspec/rspec', branch: 'main'
gem 'rspec-core', github: 'rspec/rspec-core', branch: 'main'
gem 'rspec-support', github: 'rspec/rspec-support', branch: 'main'
gem 'rspec-mocks', github: 'rspec/rspec-mocks', branch: 'main'
gem 'rspec-expectations', github: 'rspec/rspec-expectations', branch: 'main'
gem 'cucumber', github: 'cucumber/cucumber-ruby'
gem 'cucumber-core', github: 'cucumber/cucumber-ruby-core'
gem 'cucumber-wire', github: 'cucumber/cucumber-ruby-wire'
gem 'puma', github: 'puma/puma'
gem 'selenium-webdriver', '>= 4.8.6'



================================================
FILE: gemfiles/Gemfile.chrome_edge
================================================
source "https://rubygems.org"

gem 'bundler', '< 3.0'
gemspec path: '..'

gem 'xpath', github: 'teamcapybara/xpath'

gem 'selenium-webdriver', github: 'seleniumhq/selenium', glob: 'rb/*.gemspec'
gem 'rack', github: 'rack/rack'
gem 'sinatra', github: 'sinatra/sinatra', branch: 'master'

gem 'puma', github: 'puma/puma'


================================================
FILE: gemfiles/Gemfile.edge-firefox
================================================
source "https://rubygems.org"

gem 'bundler', '< 3.0'
gemspec path: '..'

gem 'xpath', github: 'teamcapybara/xpath'

gem 'selenium-webdriver', '>= 4.8.0'
gem 'rack', github: 'rack/rack'
gem 'sinatra', github: 'sinatra/sinatra', branch: 'master'

gem 'puma', github: 'puma/puma'


================================================
FILE: gemfiles/Gemfile.ie
================================================
source 'https://rubygems.org'

gem 'bundler', '< 3.0'
gemspec path: '..'


================================================
FILE: gemfiles/Gemfile.rack2
================================================
source "https://rubygems.org"

gem 'bundler', '< 3.0'
gemspec path: '..'

gem 'rack', '~>2.0'
gem 'sinatra', '~>3'

================================================
FILE: gemfiles/Gemfile.rack3
================================================
source "https://rubygems.org"

gem 'bundler', '< 3.0'
gemspec path: '..'

gem 'rack', '~>3.0'
gem 'rackup'
gem 'sinatra', '~>4'

================================================
FILE: lib/capybara/config.rb
================================================
# frozen_string_literal: true

require 'forwardable'
require 'capybara/session/config'

module Capybara
  class Config
    extend Forwardable

    OPTIONS = %i[
      app reuse_server threadsafe server default_driver javascript_driver use_html5_parsing allow_gumbo
    ].freeze

    attr_accessor :app, :use_html5_parsing
    attr_reader :reuse_server, :threadsafe, :session_options # rubocop:disable Style/BisectedAttrAccessor
    attr_writer :default_driver, :javascript_driver

    SessionConfig::OPTIONS.each do |method|
      def_delegators :session_options, method, "#{method}="
    end

    def initialize
      @session_options = Capybara::SessionConfig.new
      @javascript_driver = nil
    end

    attr_writer :reuse_server # rubocop:disable Style/BisectedAttrAccessor

    def threadsafe=(bool)
      if (bool != threadsafe) && Session.instance_created?
        raise 'Threadsafe setting cannot be changed once a session is created'
      end

      @threadsafe = bool
    end

    ##
    #
    # Return the proc that Capybara will call to run the Rack application.
    # The block returned receives a rack app, port, and host/ip and should run a Rack handler
    # By default, Capybara will try to use puma.
    #
    attr_reader :server

    ##
    #
    # Set the server to use.
    #
    #     Capybara.server = :webrick
    #     Capybara.server = :puma, { Silent: true }
    #
    # @overload server=(name)
    #   @param [Symbol] name     Name of the server type to use
    # @overload server=([name, options])
    #   @param [Symbol] name Name of the server type to use
    #   @param [Hash] options Options to pass to the server block
    # @see register_server
    #
    def server=(name)
      name, options = *name if name.is_a? Array
      @server = if name.respond_to? :call
        name
      elsif options
        proc { |app, port, host| Capybara.servers[name.to_sym].call(app, port, host, **options) }
      else
        Capybara.servers[name.to_sym]
      end
    end

    ##
    #
    # @return [Symbol]    The name of the driver to use by default
    #
    def default_driver
      @default_driver || :rack_test
    end

    ##
    #
    # @return [Symbol]    The name of the driver used when JavaScript is needed
    #
    def javascript_driver
      @javascript_driver || :selenium
    end

    def deprecate(method, alternate_method, once: false)
      @deprecation_notified ||= {}
      unless once && @deprecation_notified[method]
        Capybara::Helpers.warn "DEPRECATED: ##{method} is deprecated, please use ##{alternate_method} instead: #{Capybara::Helpers.filter_backtrace(caller)}"
      end
      @deprecation_notified[method] = true
    end

    def allow_gumbo=(val)
      deprecate('allow_gumbo=', 'use_html5_parsing=')
      self.use_html5_parsing = val
    end

    def allow_gumbo
      deprecate('allow_gumbo', 'use_html5_parsing')
      use_html5_parsing
    end
  end
end


================================================
FILE: lib/capybara/cucumber.rb
================================================
# frozen_string_literal: true

require 'capybara/dsl'
require 'capybara/rspec/matchers'
require 'capybara/rspec/matcher_proxies'

World(Capybara::DSL)
World(Capybara::RSpecMatchers)

After do
  Capybara.reset_sessions!
end

Before do
  Capybara.use_default_driver
end

Before '@javascript' do
  Capybara.current_driver = Capybara.javascript_driver
end

Before do |scenario|
  scenario.source_tag_names.each do |tag|
    driver_name = tag.sub(/^@/, '').to_sym
    Capybara.current_driver = driver_name if Capybara.drivers[driver_name]
  end
end


================================================
FILE: lib/capybara/driver/base.rb
================================================
# frozen_string_literal: true

class Capybara::Driver::Base
  attr_writer :session

  def current_url
    raise NotImplementedError
  end

  def visit(path)
    raise NotImplementedError
  end

  def refresh
    raise NotImplementedError
  end

  def find_xpath(query, **options)
    raise NotImplementedError
  end

  def find_css(query, **options)
    raise NotImplementedError
  end

  def html
    raise NotImplementedError
  end

  def go_back
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_back'
  end

  def go_forward
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_forward'
  end

  def execute_script(script, *args)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#execute_script'
  end

  def evaluate_script(script, *args)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script'
  end

  def evaluate_async_script(script, *args)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script_asnyc'
  end

  def save_screenshot(path, **options)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#save_screenshot'
  end

  def response_headers
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#response_headers'
  end

  def status_code
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#status_code'
  end

  def send_keys(*)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#send_keys'
  end

  def active_element
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#active_element'
  end

  ##
  #
  # @param frame [Capybara::Node::Element, :parent, :top]  The iframe element to switch to
  #
  def switch_to_frame(frame)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_frame'
  end

  def frame_title
    find_xpath('/html/head/title').map(&:all_text).first.to_s
  end

  def frame_url
    evaluate_script('document.location.href')
  rescue Capybara::NotSupportedByDriverError
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#frame_title'
  end

  def current_window_handle
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#current_window_handle'
  end

  def window_size(handle)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_size'
  end

  def resize_window_to(handle, width, height)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#resize_window_to'
  end

  def maximize_window(handle)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#maximize_window'
  end

  def fullscreen_window(handle)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#fullscreen_window'
  end

  def close_window(handle)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#close_window'
  end

  def window_handles
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_handles'
  end

  def open_new_window
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#open_new_window'
  end

  def switch_to_window(handle)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_window'
  end

  def no_such_window_error
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#no_such_window_error'
  end

  ##
  #
  # Execute the block, and then accept the modal opened.
  # @param type [:alert, :confirm, :prompt]
  # @option options [Numeric] :wait  How long to wait for the modal to appear after executing the block.
  # @option options [String, Regexp] :text  Text to verify is in the message shown in the modal
  # @option options [String] :with  Text to fill in in the case of a prompt
  # @return [String]  the message shown in the modal
  # @raise [Capybara::ModalNotFound]  if modal dialog hasn't been found
  #
  def accept_modal(type, **options, &blk)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#accept_modal'
  end

  ##
  #
  # Execute the block, and then dismiss the modal opened.
  # @param type [:alert, :confirm, :prompt]
  # @option options [Numeric] :wait  How long to wait for the modal to appear after executing the block.
  # @option options [String, Regexp] :text  Text to verify is in the message shown in the modal
  # @return [String]  the message shown in the modal
  # @raise [Capybara::ModalNotFound]  if modal dialog hasn't been found
  #
  def dismiss_modal(type, **options, &blk)
    raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#dismiss_modal'
  end

  def invalid_element_errors
    []
  end

  def wait?
    false
  end

  def reset!; end

  def needs_server?
    false
  end

  def session_options
    session&.config || Capybara.session_options
  end

private

  def session
    @session ||= nil
  end
end


================================================
FILE: lib/capybara/driver/node.rb
================================================
# frozen_string_literal: true

module Capybara
  module Driver
    class Node
      attr_reader :driver, :native, :initial_cache

      def initialize(driver, native, initial_cache = {})
        @driver = driver
        @native = native
        @initial_cache = initial_cache
      end

      def all_text
        raise NotImplementedError
      end

      def visible_text
        raise NotImplementedError
      end

      def [](name)
        raise NotImplementedError
      end

      def value
        raise NotImplementedError
      end

      def style(styles)
        raise NotImplementedError
      end

      # @param value [String, Array] Array is only allowed if node has 'multiple' attribute
      # @param options [Hash] Driver specific options for how to set a value on a node
      def set(value, **options)
        raise NotImplementedError
      end

      def select_option
        raise NotImplementedError
      end

      def unselect_option
        raise NotImplementedError
      end

      def click(keys = [], **options)
        raise NotImplementedError
      end

      def right_click(keys = [], **options)
        raise NotImplementedError
      end

      def double_click(keys = [], **options)
        raise NotImplementedError
      end

      def send_keys(*args)
        raise NotImplementedError
      end

      def hover
        raise NotImplementedError
      end

      def drag_to(element, **options)
        raise NotImplementedError
      end

      def drop(*args)
        raise NotImplementedError
      end

      def scroll_by(x, y)
        raise NotImplementedError
      end

      def scroll_to(element, alignment, position = nil)
        raise NotImplementedError
      end

      def tag_name
        raise NotImplementedError
      end

      def visible?
        raise NotImplementedError
      end

      def obscured?
        raise NotImplementedError
      end

      def checked?
        raise NotImplementedError
      end

      def selected?
        raise NotImplementedError
      end

      def disabled?
        raise NotImplementedError
      end

      def readonly?
        !!self[:readonly]
      end

      def multiple?
        !!self[:multiple]
      end

      def rect
        raise NotSupportedByDriverError, 'Capybara::Driver::Node#rect'
      end

      def path
        raise NotSupportedByDriverError, 'Capybara::Driver::Node#path'
      end

      def trigger(event)
        raise NotSupportedByDriverError, 'Capybara::Driver::Node#trigger'
      end

      def shadow_root
        raise NotSupportedByDriverError, 'Capybara::Driver::Node#shadow_root'
      end

      def inspect
        %(#<#{self.class} tag="#{tag_name}" path="#{path}">)
      rescue NotSupportedByDriverError
        %(#<#{self.class} tag="#{tag_name}">)
      end

      def ==(other)
        eql?(other) || (other.respond_to?(:native) && native == other.native)
      end
    end
  end
end


================================================
FILE: lib/capybara/dsl.rb
================================================
# frozen_string_literal: true

require 'capybara'

module Capybara
  module DSL
    def self.included(base)
      warn 'including Capybara::DSL in the global scope is not recommended!' if base == Object
      super
    end

    def self.extended(base)
      warn 'extending the main object with Capybara::DSL is not recommended!' if base == TOPLEVEL_BINDING.eval('self')
      super
    end

    ##
    #
    # Shortcut to working in a different session.
    #
    def using_session(name_or_session, &block)
      Capybara.using_session(name_or_session, &block)
    end

    # Shortcut to using a different wait time.
    #
    def using_wait_time(seconds, &block)
      page.using_wait_time(seconds, &block)
    end

    ##
    #
    # Shortcut to accessing the current session.
    #
    #     class MyClass
    #       include Capybara::DSL
    #
    #       def has_header?
    #         page.has_css?('h1')
    #       end
    #     end
    #
    # @return [Capybara::Session] The current session object
    #
    def page
      Capybara.current_session
    end

    Session::DSL_METHODS.each do |method|
      class_eval <<~METHOD, __FILE__, __LINE__ + 1
        def #{method}(...)
          page.method("#{method}").call(...)
        end
      METHOD
    end
  end

  extend(Capybara::DSL)
end


================================================
FILE: lib/capybara/helpers.rb
================================================
# frozen_string_literal: true

module Capybara
  # @api private
  module Helpers
  module_function

    ##
    # @deprecated
    # Normalizes whitespace space by stripping leading and trailing
    # whitespace and replacing sequences of whitespace characters
    # with a single space.
    #
    # @param [String] text     Text to normalize
    # @return [String]         Normalized text
    #
    def normalize_whitespace(text)
      Capybara::Helpers.warn 'DEPRECATED: Capybara::Helpers::normalize_whitespace is deprecated, please update your driver'
      text.to_s.gsub(/[[:space:]]+/, ' ').strip
    end

    ##
    #
    # Escapes any characters that would have special meaning in a regexp
    # if text is not a regexp
    #
    # @param [String] text Text to escape
    # @param [Boolean] exact (false) Whether or not this should be an exact text match
    # @param [Fixnum, Boolean, nil] options Options passed to Regexp.new when creating the Regexp
    # @return [Regexp] Regexp to match the passed in text and options
    #
    def to_regexp(text, exact: false, all_whitespace: false, options: nil)
      return text if text.is_a?(Regexp)

      escaped = Regexp.escape(text)
      escaped = escaped.gsub('\\ ', '[[:blank:]]') if all_whitespace
      escaped = "\\A#{escaped}\\z" if exact
      Regexp.new(escaped, options)
    end

    ##
    #
    # Injects a `<base>` tag into the given HTML code, pointing to
    # {Capybara.configure asset_host}.
    #
    # @param [String] html     HTML code to inject into
    # @param [URL] host (Capybara.asset_host) The host from which assets should be loaded
    # @return [String]         The modified HTML code
    #
    def inject_asset_host(html, host: Capybara.asset_host)
      if host && Nokogiri::HTML(html).css('base').empty?
        html.match(/<head[^<]*?>/) do |m|
          return html.clone.insert m.end(0), "<base href='#{host}' />"
        end
      end
      html
    end

    ##
    #
    # A poor man's `pluralize`. Given two declensions, one singular and one
    # plural, as well as a count, this will pick the correct declension. This
    # way we can generate grammatically correct error message.
    #
    # @param [String] singular     The singular form of the word
    # @param [String] plural       The plural form of the word
    # @param [Integer] count       The number of items
    #
    def declension(singular, plural, count)
      count == 1 ? singular : plural
    end

    def filter_backtrace(trace)
      return 'No backtrace' unless trace

      filter = %r{lib/capybara/|lib/rspec/|lib/minitest/|delegate.rb}
      new_trace = trace.take_while { |line| line !~ filter }
      new_trace = trace.grep_v(filter) if new_trace.empty?
      new_trace = trace.dup if new_trace.empty?

      new_trace.first.split(':in ', 2).first
    end

    def warn(message, uplevel: 1)
      Kernel.warn(message, uplevel: uplevel)
    end

    if defined?(Process::CLOCK_MONOTONIC_RAW)
      def monotonic_time; Process.clock_gettime Process::CLOCK_MONOTONIC_RAW; end
    elsif defined?(Process::CLOCK_MONOTONIC_PRECISE)
      def monotonic_time; Process.clock_gettime Process::CLOCK_MONOTONIC_PRECISE; end
    elsif defined?(Process::CLOCK_MONOTONIC)
      def monotonic_time; Process.clock_gettime Process::CLOCK_MONOTONIC; end
    else
      def monotonic_time; Time.now.to_f; end
    end

    def timer(expire_in:)
      Timer.new(expire_in)
    end

    class Timer
      def initialize(expire_in)
        @start = current
        @expire_in = expire_in
      end

      def expired?
        if stalled?
          raise Capybara::FrozenInTime, 'Time appears to be frozen. Capybara does not work with libraries which freeze time, consider using time travelling instead'
        end

        current - @start >= @expire_in
      end

      def stalled?
        @start == current
      end

    private

      def current
        Capybara::Helpers.monotonic_time
      end
    end
  end
end


================================================
FILE: lib/capybara/minitest/spec.rb
================================================
# frozen_string_literal: true

require 'minitest/spec'

module Capybara
  module Minitest
    module Expectations
      ##
      # Expectation that there is an ancestor
      #
      # @!method must_have_ancestor
      #   See {Capybara::Node::Matchers#has_ancestor?}

      ##
      # Expectation that there is button
      #
      # @!method must_have_button
      #   See {Capybara::Node::Matchers#has_button?}

      ##
      # Expectation that there is no button
      #
      # @!method wont_have_button
      #   See {Capybara::Node::Matchers#has_no_button?}

      ##
      # Expectation that there is checked_field
      #
      # @!method must_have_checked_field
      #   See {Capybara::Node::Matchers#has_checked_field?}

      ##
      # Expectation that there is no checked_field
      #
      # @!method wont_have_checked_field
      #   See {Capybara::Node::Matchers#has_no_checked_field?}

      ##
      # Expectation that there is unchecked_field
      #
      # @!method must_have_unchecked_field
      #   See {Capybara::Node::Matchers#has_unchecked_field?}

      ##
      # Expectation that there is no unchecked_field
      #
      # @!method wont_have_unchecked_field
      #   See {Capybara::Node::Matchers#has_no_unchecked_field?}

      ##
      # Expectation that page content does match
      #
      # @!method must_have_content
      #   See {Capybara::Node::Matchers#has_content?}

      ##
      # Expectation that page content does not match
      #
      # @!method wont_have_content
      #   See {Capybara::Node::Matchers#has_no_content?}

      ##
      # Expectation that there is css
      #
      # @!method must_have_css
      #   See {Capybara::Node::Matchers#has_css?}

      ##
      # Expectation that there is no css
      #
      # @!method wont_have_css
      #   See {Capybara::Node::Matchers#has_no_css?}

      ##
      # Expectation that current path matches
      #
      # @!method must_have_current_path
      #   See {Capybara::SessionMatchers#has_current_path?}

      ##
      # Expectation that current page does not match
      #
      # @!method wont_have_current_path
      #   See {Capybara::SessionMatchers#has_no_current_path?}

      ##
      # Expectation that there is field
      #
      # @!method must_have_field
      #   See {Capybara::Node::Matchers#has_field?}

      ##
      # Expectation that there is no field
      #
      # @!method wont_have_field
      #   See {Capybara::Node::Matchers#has_no_field?}

      ##
      # Expectation that there is element
      #
      # @!method must_have_element
      #   See {Capybara::Node::Matchers#has_element?}

      ##
      # Expectation that there is no element
      #
      # @!method wont_have_element
      #   See {Capybara::Node::Matchers#has_no_element?}

      ##
      # Expectation that there is link
      #
      # @!method must_have_link
      #   See {Capybara::Node::Matchers#has_link?}

      ##
      # Expectation that there is no link
      #
      # @!method wont_have_link
      #   See {Capybara::Node::Matchers#has_no_link?}

      ##
      # Expectation that page text does match
      #
      # @!method must_have_text
      #   See {Capybara::Node::Matchers#has_text?}

      ##
      # Expectation that page text does not match
      #
      # @!method wont_have_text
      #   See {Capybara::Node::Matchers#has_no_text?}

      ##
      # Expectation that page title does match
      #
      # @!method must_have_title
      #   See {Capybara::Node::DocumentMatchers#has_title?}

      ##
      # Expectation that page title does not match
      #
      # @!method wont_have_title
      #   See {Capybara::Node::DocumentMatchers#has_no_title?}

      ##
      # Expectation that there is select
      #
      # @!method must_have_select
      #   See {Capybara::Node::Matchers#has_select?}

      ##
      # Expectation that there is no select
      #
      # @!method wont_have_select
      #   See {Capybara::Node::Matchers#has_no_select?}

      ##
      # Expectation that there is a selector
      #
      # @!method must_have_selector
      #   See {Capybara::Node::Matchers#has_selector?}

      ##
      # Expectation that there is no selector
      #
      # @!method wont_have_selector
      #   See {Capybara::Node::Matchers#has_no_selector?}

      ##
      # Expectation that all of the provided selectors are present
      #
      # @!method must_have_all_of_selectors
      #   See {Capybara::Node::Matchers#assert_all_of_selectors}

      ##
      # Expectation that none of the provided selectors are present
      #
      # @!method must_have_none_of_selectors
      #   See {Capybara::Node::Matchers#assert_none_of_selectors}

      ##
      # Expectation that any of the provided selectors are present
      #
      # @!method must_have_any_of_selectors
      #   See {Capybara::Node::Matchers#assert_any_of_selectors}

      ##
      # Expectation that there is a sibling
      #
      # @!method must_have_sibling
      #   See {Capybara::Node::Matchers#has_sibling?}

      ##
      # Expectation that element has style
      #
      # @!method must_match_style
      #   See {Capybara::Node::Matchers#matches_style?}

      ##
      # Expectation that there is table
      #
      # @!method must_have_table
      #   See {Capybara::Node::Matchers#has_table?}

      ##
      # Expectation that there is no table
      #
      # @!method wont_have_table
      #   See {Capybara::Node::Matchers#has_no_table?}

      ##
      # Expectation that there is xpath
      #
      # @!method must_have_xpath
      #   See {Capybara::Node::Matchers#has_xpath?}

      ##
      # Expectation that there is no xpath
      #
      # @!method wont_have_xpath
      #   See {Capybara::Node::Matchers#has_no_xpath?}

      # This currently doesn't work for Ruby 2.8 due to Minitest not forwarding keyword args separately
      # %w[text content title current_path].each do |assertion|
      #   infect_an_assertion "assert_#{assertion}", "must_have_#{assertion}", :reverse
      #   infect_an_assertion "refute_#{assertion}", "wont_have_#{assertion}", :reverse
      # end

      # rubocop:disable Style/MultilineBlockChain
      (%w[text content title current_path
          selector xpath css link button field select table checked_field unchecked_field
          ancestor sibling].flat_map do |assertion|
            [%W[assert_#{assertion} must_have_#{assertion}],
             %W[refute_#{assertion} wont_have_#{assertion}]]
          end + [%w[assert_all_of_selectors must_have_all_of_selectors],
                 %w[assert_none_of_selectors must_have_none_of_selectors],
                 %w[assert_any_of_selectors must_have_any_of_selectors],
                 %w[assert_matches_style must_match_style]] +
      %w[selector xpath css].flat_map do |assertion|
        [%W[assert_matches_#{assertion} must_match_#{assertion}],
         %W[refute_matches_#{assertion} wont_match_#{assertion}]]
      end).each do |(meth, new_name)|
        class_eval <<-ASSERTION, __FILE__, __LINE__ + 1
          def #{new_name}(...)
            ::Minitest::Expectation.new(self, ::Minitest::Spec.current).#{new_name}(...)
          end
        ASSERTION

        ::Minitest::Expectation.class_eval <<-ASSERTION, __FILE__, __LINE__ + 1
          def #{new_name}(...)
            raise "Calling ##{new_name} outside of test." unless ctx
            ctx.#{meth}(target, ...)
          end
        ASSERTION
      end
      # rubocop:enable Style/MultilineBlockChain

      ##
      # @deprecated
      def must_have_style(...)
        warn 'must_have_style is deprecated, please use must_match_style'
        must_match_style(...)
      end
    end
  end
end

class Capybara::Session
  include Capybara::Minitest::Expectations unless ENV['MT_NO_EXPECTATIONS']
end

class Capybara::Node::Base
  include Capybara::Minitest::Expectations unless ENV['MT_NO_EXPECTATIONS']
end

class Capybara::Node::Simple
  include Capybara::Minitest::Expectations unless ENV['MT_NO_EXPECTATIONS']
end


================================================
FILE: lib/capybara/minitest.rb
================================================
# frozen_string_literal: true

require 'minitest'
require 'capybara/dsl'

module Capybara
  module Minitest
    module Assertions
      ##
      # Assert text exists
      #
      # @!method assert_content
      # @!method assert_text
      #   See {Capybara::Node::Matchers#assert_text}

      ##
      # Assert text does not exist
      #
      # @!method refute_content
      # @!method assert_no_content
      # @!method refute_text
      # @!method assert_no_text
      #   See {Capybara::Node::Matchers#assert_no_text}

      ##
      # Assertion that page title does match
      #
      # @!method assert_title
      #   See {Capybara::Node::DocumentMatchers#assert_title}

      ##
      # Assertion that page title does not match
      #
      # @!method refute_title
      # @!method assert_no_title
      #   See {Capybara::Node::DocumentMatchers#assert_no_title}

      ##
      # Assertion that current path matches
      #
      # @!method assert_current_path
      #   See {Capybara::SessionMatchers#assert_current_path}

      ##
      # Assertion that current page does not match
      #
      # @!method refute_current_path
      # @!method assert_no_current_path
      #   See {Capybara::SessionMatchers#assert_no_current_path}

      %w[text no_text title no_title current_path no_current_path].each do |assertion_name|
        class_eval <<-ASSERTION, __FILE__, __LINE__ + 1
          def assert_#{assertion_name}(*args, **kwargs, &optional_filter_block)
            self.assertions +=1
            subject, args = determine_subject(args)
            subject.assert_#{assertion_name}(*args, **kwargs, &optional_filter_block)
          rescue Capybara::ExpectationNotMet => e
            raise ::Minitest::Assertion, e.message
          end
        ASSERTION
      end

      alias_method :refute_title, :assert_no_title
      alias_method :refute_text, :assert_no_text
      alias_method :refute_content, :refute_text
      alias_method :refute_current_path, :assert_no_current_path
      alias_method :assert_content, :assert_text
      alias_method :assert_no_content, :refute_text

      ##
      # Assert selector exists on page
      #
      # @!method assert_selector
      #   See {Capybara::Node::Matchers#assert_selector}

      ##
      # Assert selector does not exist on page
      #
      # @!method refute_selector
      # @!method assert_no_selector
      #   See {Capybara::Node::Matchers#assert_no_selector}

      ##
      # Assert element matches selector
      #
      # @!method assert_matches_selector
      #   See {Capybara::Node::Matchers#assert_matches_selector}

      ##
      # Assert element does not match selector
      #
      # @!method refute_matches_selector
      # @!method assert_not_matches_selector
      #   See {Capybara::Node::Matchers#assert_not_matches_selector}

      ##
      # Assert all of the provided selectors exist on page
      #
      # @!method assert_all_of_selectors
      #   See {Capybara::Node::Matchers#assert_all_of_selectors}

      ##
      # Assert none of the provided selectors exist on page
      #
      # @!method assert_none_of_selectors
      #   See {Capybara::Node::Matchers#assert_none_of_selectors}

      ##
      # Assert any of the provided selectors exist on page
      #
      # @!method assert_any_of_selectors
      #   See {Capybara::Node::Matchers#assert_any_of_selectors}

      ##
      # Assert element has the provided CSS styles
      #
      # @!method assert_matches_style
      #   See {Capybara::Node::Matchers#assert_matches_style}

      ##
      # Assert element has a matching sibling
      #
      # @!method assert_sibling
      #   See {Capybara::Node::Matchers#assert_sibling}

      ##
      # Assert element does not have a matching sibling
      #
      # @!method refute_sibling
      # @!method assert_no_sibling
      #   See {Capybara::Node::Matchers#assert_no_sibling}

      ##
      # Assert element has a matching ancestor
      #
      # @!method assert_ancestor
      #   See {Capybara::Node::Matchers#assert_ancestor}

      ##
      # Assert element does not have a matching ancestor
      #
      # @!method refute_ancestor
      # @!method assert_no_ancestor
      #   See {Capybara::Node::Matchers#assert_no_ancestor}

      %w[selector no_selector matches_style
         all_of_selectors none_of_selectors any_of_selectors
         matches_selector not_matches_selector
         sibling no_sibling ancestor no_ancestor].each do |assertion_name|
        class_eval <<-ASSERTION, __FILE__, __LINE__ + 1
          def assert_#{assertion_name} *args, &optional_filter_block
            self.assertions +=1
            subject, args = determine_subject(args)
            subject.assert_#{assertion_name}(*args, &optional_filter_block)
          rescue Capybara::ExpectationNotMet => e
            raise ::Minitest::Assertion, e.message
          end
        ASSERTION
        ruby2_keywords "assert_#{assertion_name}" if respond_to?(:ruby2_keywords)
      end

      alias_method :refute_selector, :assert_no_selector
      alias_method :refute_matches_selector, :assert_not_matches_selector
      alias_method :refute_ancestor, :assert_no_ancestor
      alias_method :refute_sibling, :assert_no_sibling

      ##
      # Assert that provided xpath exists
      #
      # @!method assert_xpath
      #   See {Capybara::Node::Matchers#has_xpath?}

      ##
      # Assert that provide xpath does not exist
      #
      # @!method refute_xpath
      # @!method assert_no_xpath
      #   See {Capybara::Node::Matchers#has_no_xpath?}

      ##
      # Assert that provided css exists
      #
      # @!method assert_css
      #   See {Capybara::Node::Matchers#has_css?}

      ##
      # Assert that provided css does not exist
      #
      # @!method refute_css
      # @!method assert_no_css
      #   See {Capybara::Node::Matchers#has_no_css?}

      ##
      # Assert that provided element exists
      #
      # @!method assert_element
      #   See {Capybara::Node::Matchers#has_element?}

      ##
      # Assert that provided element does not exist
      #
      # @!method assert_no_element
      # @!method refute_element
      #   See {Capybara::Node::Matchers#has_no_element?}

      ##
      # Assert that provided link exists
      #
      # @!method assert_link
      #   See {Capybara::Node::Matchers#has_link?}

      ##
      # Assert that provided link does not exist
      #
      # @!method assert_no_link
      # @!method refute_link
      #   See {Capybara::Node::Matchers#has_no_link?}

      ##
      # Assert that provided button exists
      #
      # @!method assert_button
      #   See {Capybara::Node::Matchers#has_button?}

      ##
      # Assert that provided button does not exist
      #
      # @!method refute_button
      # @!method assert_no_button
      #   See {Capybara::Node::Matchers#has_no_button?}

      ##
      # Assert that provided field exists
      #
      # @!method assert_field
      #   See {Capybara::Node::Matchers#has_field?}

      ##
      # Assert that provided field does not exist
      #
      # @!method refute_field
      # @!method assert_no_field
      #   See {Capybara::Node::Matchers#has_no_field?}

      ##
      # Assert that provided checked field exists
      #
      # @!method assert_checked_field
      #   See {Capybara::Node::Matchers#has_checked_field?}

      ##
      # Assert that provided checked_field does not exist
      #
      # @!method assert_no_checked_field
      # @!method refute_checked_field
      #   See {Capybara::Node::Matchers#has_no_checked_field?}

      ##
      # Assert that provided unchecked field exists
      #
      # @!method assert_unchecked_field
      #   See {Capybara::Node::Matchers#has_unchecked_field?}

      ##
      # Assert that provided unchecked field does not exist
      #
      # @!method assert_no_unchecked_field
      # @!method refute_unchecked_field
      #   See {Capybara::Node::Matchers#has_no_unchecked_field?}

      ##
      # Assert that provided select exists
      #
      # @!method assert_select
      #   See {Capybara::Node::Matchers#has_select?}

      ##
      # Assert that provided select does not exist
      #
      # @!method refute_select
      # @!method assert_no_select
      #   See {Capybara::Node::Matchers#has_no_select?}

      ##
      # Assert that provided table exists
      #
      # @!method assert_table
      #   See {Capybara::Node::Matchers#has_table?}

      ##
      # Assert that provided table does not exist
      #
      # @!method refute_table
      # @!method assert_no_table
      #   See {Capybara::Node::Matchers#has_no_table?}

      %w[xpath css element link button field select table].each do |selector_type|
        define_method "assert_#{selector_type}" do |*args, &optional_filter_block|
          subject, args = determine_subject(args)
          locator, options = extract_locator(args)
          assert_selector(subject, selector_type.to_sym, locator, **options, &optional_filter_block)
        end
        ruby2_keywords "assert_#{selector_type}" if respond_to?(:ruby2_keywords)

        define_method "assert_no_#{selector_type}" do |*args, &optional_filter_block|
          subject, args = determine_subject(args)
          locator, options = extract_locator(args)
          assert_no_selector(subject, selector_type.to_sym, locator, **options, &optional_filter_block)
        end
        ruby2_keywords "assert_no_#{selector_type}" if respond_to?(:ruby2_keywords)
        alias_method "refute_#{selector_type}", "assert_no_#{selector_type}"
      end

      %w[checked unchecked].each do |field_type|
        define_method "assert_#{field_type}_field" do |*args, &optional_filter_block|
          subject, args = determine_subject(args)
          locator, options = extract_locator(args)
          assert_selector(subject, :field, locator, **options.merge(field_type.to_sym => true), &optional_filter_block)
        end
        ruby2_keywords "assert_#{field_type}_field" if respond_to?(:ruby2_keywords)

        define_method "assert_no_#{field_type}_field" do |*args, &optional_filter_block|
          subject, args = determine_subject(args)
          locator, options = extract_locator(args)
          assert_no_selector(
            subject,
            :field,
            locator,
            **options.merge(field_type.to_sym => true),
            &optional_filter_block
          )
        end
        ruby2_keywords "assert_no_#{field_type}_field" if respond_to?(:ruby2_keywords)
        alias_method "refute_#{field_type}_field", "assert_no_#{field_type}_field"
      end

      ##
      # Assert that element matches xpath
      #
      # @!method assert_matches_xpath
      #   See {Capybara::Node::Matchers#matches_xpath?}

      ##
      # Assert that element does not match xpath
      #
      # @!method refute_matches_xpath
      # @!method assert_not_matches_xpath
      #   See {Capybara::Node::Matchers#not_matches_xpath?}

      ##
      # Assert that element matches css
      #
      # @!method assert_matches_css
      #   See {Capybara::Node::Matchers#matches_css?}

      ##
      # Assert that element matches css
      #
      # @!method refute_matches_css
      # @!method assert_not_matches_css
      #   See {Capybara::Node::Matchers#not_matches_css?}

      %w[xpath css].each do |selector_type|
        define_method "assert_matches_#{selector_type}" do |*args, &optional_filter_block|
          subject, args = determine_subject(args)
          assert_matches_selector(subject, selector_type.to_sym, *args, &optional_filter_block)
        end
        ruby2_keywords "assert_matches_#{selector_type}" if respond_to?(:ruby2_keywords)

        define_method "assert_not_matches_#{selector_type}" do |*args, &optional_filter_block|
          subject, args = determine_subject(args)
          assert_not_matches_selector(subject, selector_type.to_sym, *args, &optional_filter_block)
        end
        ruby2_keywords "assert_not_matches_#{selector_type}" if respond_to?(:ruby2_keywords)
        alias_method "refute_matches_#{selector_type}", "assert_not_matches_#{selector_type}"
      end

    private

      def determine_subject(args)
        case args.first
        when Capybara::Session, Capybara::Node::Base, Capybara::Node::Simple
          [args.shift, args]
        when ->(arg) { arg.respond_to?(:to_capybara_node) }
          [args.shift.to_capybara_node, args]
        else
          [page, args]
        end
      end

      def extract_locator(args)
        locator, options = *args, {}
        locator, options = nil, locator if locator.is_a? Hash
        [locator, options]
      end
    end
  end
end


================================================
FILE: lib/capybara/node/actions.rb
================================================
# frozen_string_literal: true

module Capybara
  module Node
    module Actions
      # @!macro waiting_behavior
      #   If the driver is capable of executing JavaScript, this method will wait for a set amount of time
      #   and continuously retry finding the element until either the element is found or the time
      #   expires. The length of time this method will wait is controlled through {Capybara.configure default_max_wait_time}.
      #
      #   @option options [false, true, Numeric] wait
      #     Maximum time to wait for matching element to appear. Defaults to {Capybara.configure default_max_wait_time}.

      ##
      #
      # Finds a button or link and clicks it. See {#click_button} and
      # {#click_link} for what locator will match against for each type of element.
      #
      # @overload click_link_or_button([locator], **options)
      #   @macro waiting_behavior
      #   @param [String] locator      See {#click_button} and {#click_link}
      #
      # @return [Capybara::Node::Element]  The element clicked
      #
      def click_link_or_button(locator = nil, **options)
        find(:link_or_button, locator, **options).click
      end
      alias_method :click_on, :click_link_or_button

      ##
      #
      # Finds a link by id, {Capybara.configure test_id} attribute, text or title and clicks it. Also looks at image
      # alt text inside the link.
      #
      # @overload click_link([locator], **options)
      #   @macro waiting_behavior
      #   @param [String] locator         text, id, {Capybara.configure test_id} attribute, title or nested image's alt attribute
      #   @param [Hash] options           See {Capybara::Node::Finders#find_link}
      #
      # @return [Capybara::Node::Element]  The element clicked
      def click_link(locator = nil, **options)
        find(:link, locator, **options).click
      end

      ##
      #
      # Finds a button on the page and clicks it.
      # This can be any `<input>` element of type submit, reset, image, button or it can be a
      # `<button>` element. All buttons can be found by their id, name, {Capybara.configure test_id} attribute, value, or title. `<button>` elements can also be found
      # by their text content, and image `<input>` elements by their alt attribute.
      #
      # @overload click_button([locator], **options)
      #   @macro waiting_behavior
      #   @param [String] locator      Which button to find
      #   @param [Hash] options        See {Capybara::Node::Finders#find_button}
      # @return [Capybara::Node::Element]  The element clicked
      def click_button(locator = nil, **options)
        find(:button, locator, **options).click
      end

      ##
      #
      # Locate a text field or text area and fill it in with the given text.
      # The field can be found via its name, id, {Capybara.configure test_id} attribute, placeholder, or label text.
      # If no locator is provided this will operate on self or a descendant.
      #
      #     # will fill in a descendant fillable field with name, id, or label text matching 'Name'
      #     page.fill_in 'Name', with: 'Bob'
      #
      #     # will fill in `el` if it's a fillable field
      #     el.fill_in with: 'Tom'
      #
      #
      # @overload fill_in([locator], with:, **options)
      #   @param [String] locator                 Which field to fill in
      #   @param [Hash] options
      #   @param with: [String]  
Download .txt
gitextract_qjm4xzrk/

├── .codeclimate.yml
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE.md
│   ├── dependabot.yml
│   ├── lock.yml
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .rspec
├── .rubocop.yml
├── .yardopts
├── CONTRIBUTING.md
├── Gemfile
├── History.md
├── License.txt
├── README.md
├── Rakefile
├── UPGRADING.md
├── appveyor.yml.outdated
├── capybara.gemspec
├── docker-compose.yml
├── features/
│   ├── capybara.feature
│   ├── named_driver_feature.feature
│   ├── step_definitions/
│   │   └── capybara_steps.rb
│   └── support/
│       └── env.rb
├── gem-public_cert.pem
├── gemfiles/
│   ├── Gemfile.base-versions
│   ├── Gemfile.beta-versions
│   ├── Gemfile.chrome_edge
│   ├── Gemfile.edge-firefox
│   ├── Gemfile.ie
│   ├── Gemfile.rack2
│   └── Gemfile.rack3
├── lib/
│   ├── capybara/
│   │   ├── config.rb
│   │   ├── cucumber.rb
│   │   ├── driver/
│   │   │   ├── base.rb
│   │   │   └── node.rb
│   │   ├── dsl.rb
│   │   ├── helpers.rb
│   │   ├── minitest/
│   │   │   └── spec.rb
│   │   ├── minitest.rb
│   │   ├── node/
│   │   │   ├── actions.rb
│   │   │   ├── base.rb
│   │   │   ├── document.rb
│   │   │   ├── document_matchers.rb
│   │   │   ├── element.rb
│   │   │   ├── finders.rb
│   │   │   ├── matchers.rb
│   │   │   ├── simple.rb
│   │   │   └── whitespace_normalizer.rb
│   │   ├── queries/
│   │   │   ├── active_element_query.rb
│   │   │   ├── ancestor_query.rb
│   │   │   ├── base_query.rb
│   │   │   ├── current_path_query.rb
│   │   │   ├── match_query.rb
│   │   │   ├── selector_query.rb
│   │   │   ├── sibling_query.rb
│   │   │   ├── style_query.rb
│   │   │   ├── text_query.rb
│   │   │   └── title_query.rb
│   │   ├── rack_test/
│   │   │   ├── browser.rb
│   │   │   ├── css_handlers.rb
│   │   │   ├── driver.rb
│   │   │   ├── errors.rb
│   │   │   ├── form.rb
│   │   │   └── node.rb
│   │   ├── rails.rb
│   │   ├── registration_container.rb
│   │   ├── registrations/
│   │   │   ├── drivers.rb
│   │   │   ├── patches/
│   │   │   │   └── puma_ssl.rb
│   │   │   └── servers.rb
│   │   ├── result.rb
│   │   ├── rspec/
│   │   │   ├── features.rb
│   │   │   ├── matcher_proxies.rb
│   │   │   ├── matchers/
│   │   │   │   ├── base.rb
│   │   │   │   ├── become_closed.rb
│   │   │   │   ├── compound.rb
│   │   │   │   ├── count_sugar.rb
│   │   │   │   ├── have_ancestor.rb
│   │   │   │   ├── have_current_path.rb
│   │   │   │   ├── have_selector.rb
│   │   │   │   ├── have_sibling.rb
│   │   │   │   ├── have_text.rb
│   │   │   │   ├── have_title.rb
│   │   │   │   ├── match_selector.rb
│   │   │   │   ├── match_style.rb
│   │   │   │   └── spatial_sugar.rb
│   │   │   └── matchers.rb
│   │   ├── rspec.rb
│   │   ├── selector/
│   │   │   ├── builders/
│   │   │   │   ├── css_builder.rb
│   │   │   │   └── xpath_builder.rb
│   │   │   ├── css.rb
│   │   │   ├── definition/
│   │   │   │   ├── button.rb
│   │   │   │   ├── checkbox.rb
│   │   │   │   ├── css.rb
│   │   │   │   ├── datalist_input.rb
│   │   │   │   ├── datalist_option.rb
│   │   │   │   ├── element.rb
│   │   │   │   ├── field.rb
│   │   │   │   ├── fieldset.rb
│   │   │   │   ├── file_field.rb
│   │   │   │   ├── fillable_field.rb
│   │   │   │   ├── frame.rb
│   │   │   │   ├── id.rb
│   │   │   │   ├── label.rb
│   │   │   │   ├── link.rb
│   │   │   │   ├── link_or_button.rb
│   │   │   │   ├── option.rb
│   │   │   │   ├── radio_button.rb
│   │   │   │   ├── select.rb
│   │   │   │   ├── table.rb
│   │   │   │   ├── table_row.rb
│   │   │   │   └── xpath.rb
│   │   │   ├── definition.rb
│   │   │   ├── filter.rb
│   │   │   ├── filter_set.rb
│   │   │   ├── filters/
│   │   │   │   ├── base.rb
│   │   │   │   ├── expression_filter.rb
│   │   │   │   ├── locator_filter.rb
│   │   │   │   └── node_filter.rb
│   │   │   ├── regexp_disassembler.rb
│   │   │   ├── selector.rb
│   │   │   └── xpath_extensions.rb
│   │   ├── selector.rb
│   │   ├── selenium/
│   │   │   ├── atoms/
│   │   │   │   └── src/
│   │   │   │       ├── getAttribute.js
│   │   │   │       └── isDisplayed.js
│   │   │   ├── driver.rb
│   │   │   ├── driver_specializations/
│   │   │   │   ├── chrome_driver.rb
│   │   │   │   ├── edge_driver.rb
│   │   │   │   ├── firefox_driver.rb
│   │   │   │   ├── internet_explorer_driver.rb
│   │   │   │   └── safari_driver.rb
│   │   │   ├── extensions/
│   │   │   │   ├── file_input_click_emulation.rb
│   │   │   │   ├── find.rb
│   │   │   │   ├── html5_drag.rb
│   │   │   │   ├── modifier_keys_stack.rb
│   │   │   │   └── scroll.rb
│   │   │   ├── node.rb
│   │   │   ├── nodes/
│   │   │   │   ├── chrome_node.rb
│   │   │   │   ├── edge_node.rb
│   │   │   │   ├── firefox_node.rb
│   │   │   │   ├── ie_node.rb
│   │   │   │   └── safari_node.rb
│   │   │   └── patches/
│   │   │       ├── atoms.rb
│   │   │       ├── is_displayed.rb
│   │   │       ├── logs.rb
│   │   │       ├── pause_duration_fix.rb
│   │   │       └── persistent_client.rb
│   │   ├── server/
│   │   │   ├── animation_disabler.rb
│   │   │   ├── checker.rb
│   │   │   └── middleware.rb
│   │   ├── server.rb
│   │   ├── session/
│   │   │   ├── config.rb
│   │   │   └── matchers.rb
│   │   ├── session.rb
│   │   ├── spec/
│   │   │   ├── fixtures/
│   │   │   │   ├── another_test_file.txt
│   │   │   │   ├── no_extension
│   │   │   │   └── test_file.txt
│   │   │   ├── public/
│   │   │   │   ├── jquery-ui.js
│   │   │   │   ├── jquery.js
│   │   │   │   ├── offset.js
│   │   │   │   └── test.js
│   │   │   ├── session/
│   │   │   │   ├── accept_alert_spec.rb
│   │   │   │   ├── accept_confirm_spec.rb
│   │   │   │   ├── accept_prompt_spec.rb
│   │   │   │   ├── active_element_spec.rb
│   │   │   │   ├── all_spec.rb
│   │   │   │   ├── ancestor_spec.rb
│   │   │   │   ├── assert_all_of_selectors_spec.rb
│   │   │   │   ├── assert_current_path_spec.rb
│   │   │   │   ├── assert_selector_spec.rb
│   │   │   │   ├── assert_style_spec.rb
│   │   │   │   ├── assert_text_spec.rb
│   │   │   │   ├── assert_title_spec.rb
│   │   │   │   ├── attach_file_spec.rb
│   │   │   │   ├── body_spec.rb
│   │   │   │   ├── check_spec.rb
│   │   │   │   ├── choose_spec.rb
│   │   │   │   ├── click_button_spec.rb
│   │   │   │   ├── click_link_or_button_spec.rb
│   │   │   │   ├── click_link_spec.rb
│   │   │   │   ├── current_scope_spec.rb
│   │   │   │   ├── current_url_spec.rb
│   │   │   │   ├── dismiss_confirm_spec.rb
│   │   │   │   ├── dismiss_prompt_spec.rb
│   │   │   │   ├── element/
│   │   │   │   │   ├── assert_match_selector_spec.rb
│   │   │   │   │   ├── match_css_spec.rb
│   │   │   │   │   ├── match_xpath_spec.rb
│   │   │   │   │   └── matches_selector_spec.rb
│   │   │   │   ├── evaluate_async_script_spec.rb
│   │   │   │   ├── evaluate_script_spec.rb
│   │   │   │   ├── execute_script_spec.rb
│   │   │   │   ├── fill_in_spec.rb
│   │   │   │   ├── find_button_spec.rb
│   │   │   │   ├── find_by_id_spec.rb
│   │   │   │   ├── find_field_spec.rb
│   │   │   │   ├── find_link_spec.rb
│   │   │   │   ├── find_spec.rb
│   │   │   │   ├── first_spec.rb
│   │   │   │   ├── frame/
│   │   │   │   │   ├── frame_title_spec.rb
│   │   │   │   │   ├── frame_url_spec.rb
│   │   │   │   │   ├── switch_to_frame_spec.rb
│   │   │   │   │   └── within_frame_spec.rb
│   │   │   │   ├── go_back_spec.rb
│   │   │   │   ├── go_forward_spec.rb
│   │   │   │   ├── has_all_selectors_spec.rb
│   │   │   │   ├── has_ancestor_spec.rb
│   │   │   │   ├── has_any_selectors_spec.rb
│   │   │   │   ├── has_button_spec.rb
│   │   │   │   ├── has_css_spec.rb
│   │   │   │   ├── has_current_path_spec.rb
│   │   │   │   ├── has_element_spec.rb
│   │   │   │   ├── has_field_spec.rb
│   │   │   │   ├── has_link_spec.rb
│   │   │   │   ├── has_none_selectors_spec.rb
│   │   │   │   ├── has_select_spec.rb
│   │   │   │   ├── has_selector_spec.rb
│   │   │   │   ├── has_sibling_spec.rb
│   │   │   │   ├── has_table_spec.rb
│   │   │   │   ├── has_text_spec.rb
│   │   │   │   ├── has_title_spec.rb
│   │   │   │   ├── has_xpath_spec.rb
│   │   │   │   ├── headers_spec.rb
│   │   │   │   ├── html_spec.rb
│   │   │   │   ├── matches_style_spec.rb
│   │   │   │   ├── node_spec.rb
│   │   │   │   ├── node_wrapper_spec.rb
│   │   │   │   ├── refresh_spec.rb
│   │   │   │   ├── reset_session_spec.rb
│   │   │   │   ├── response_code_spec.rb
│   │   │   │   ├── save_and_open_page_spec.rb
│   │   │   │   ├── save_and_open_screenshot_spec.rb
│   │   │   │   ├── save_page_spec.rb
│   │   │   │   ├── save_screenshot_spec.rb
│   │   │   │   ├── screenshot_spec.rb
│   │   │   │   ├── scroll_spec.rb
│   │   │   │   ├── select_spec.rb
│   │   │   │   ├── selectors_spec.rb
│   │   │   │   ├── sibling_spec.rb
│   │   │   │   ├── text_spec.rb
│   │   │   │   ├── title_spec.rb
│   │   │   │   ├── uncheck_spec.rb
│   │   │   │   ├── unselect_spec.rb
│   │   │   │   ├── visit_spec.rb
│   │   │   │   ├── window/
│   │   │   │   │   ├── become_closed_spec.rb
│   │   │   │   │   ├── current_window_spec.rb
│   │   │   │   │   ├── open_new_window_spec.rb
│   │   │   │   │   ├── switch_to_window_spec.rb
│   │   │   │   │   ├── window_opened_by_spec.rb
│   │   │   │   │   ├── window_spec.rb
│   │   │   │   │   ├── windows_spec.rb
│   │   │   │   │   └── within_window_spec.rb
│   │   │   │   └── within_spec.rb
│   │   │   ├── spec_helper.rb
│   │   │   ├── test_app.rb
│   │   │   └── views/
│   │   │       ├── animated.erb
│   │   │       ├── buttons.erb
│   │   │       ├── fieldsets.erb
│   │   │       ├── form.erb
│   │   │       ├── frame_child.erb
│   │   │       ├── frame_one.erb
│   │   │       ├── frame_parent.erb
│   │   │       ├── frame_two.erb
│   │   │       ├── header_links.erb
│   │   │       ├── host_links.erb
│   │   │       ├── initial_alert.erb
│   │   │       ├── layout.erb
│   │   │       ├── obscured.erb
│   │   │       ├── offset.erb
│   │   │       ├── path.erb
│   │   │       ├── popup_one.erb
│   │   │       ├── popup_two.erb
│   │   │       ├── postback.erb
│   │   │       ├── react.erb
│   │   │       ├── scroll.erb
│   │   │       ├── spatial.erb
│   │   │       ├── tables.erb
│   │   │       ├── with_animation.erb
│   │   │       ├── with_base_tag.erb
│   │   │       ├── with_count.erb
│   │   │       ├── with_dragula.erb
│   │   │       ├── with_fixed_header_footer.erb
│   │   │       ├── with_hover.erb
│   │   │       ├── with_hover1.erb
│   │   │       ├── with_html.erb
│   │   │       ├── with_html5_svg.erb
│   │   │       ├── with_html_entities.erb
│   │   │       ├── with_jquery_animation.erb
│   │   │       ├── with_js.erb
│   │   │       ├── with_jstree.erb
│   │   │       ├── with_namespace.erb
│   │   │       ├── with_scope.erb
│   │   │       ├── with_scope_other.erb
│   │   │       ├── with_shadow.erb
│   │   │       ├── with_simple_html.erb
│   │   │       ├── with_slow_unload.erb
│   │   │       ├── with_sortable_js.erb
│   │   │       ├── with_unload_alert.erb
│   │   │       ├── with_windows.erb
│   │   │       └── within_frames.erb
│   │   ├── version.rb
│   │   └── window.rb
│   └── capybara.rb
└── spec/
    ├── basic_node_spec.rb
    ├── capybara_spec.rb
    ├── counter_spec.rb
    ├── css_builder_spec.rb
    ├── css_splitter_spec.rb
    ├── dsl_spec.rb
    ├── filter_set_spec.rb
    ├── fixtures/
    │   ├── capybara.csv
    │   ├── certificate.pem
    │   ├── key.pem
    │   ├── selenium_driver_rspec_failure.rb
    │   └── selenium_driver_rspec_success.rb
    ├── minitest_spec.rb
    ├── minitest_spec_spec.rb
    ├── per_session_config_spec.rb
    ├── rack_test_spec.rb
    ├── regexp_dissassembler_spec.rb
    ├── result_spec.rb
    ├── rspec/
    │   ├── features_spec.rb
    │   ├── scenarios_spec.rb
    │   ├── shared_spec_matchers.rb
    │   └── views_spec.rb
    ├── rspec_matchers_spec.rb
    ├── rspec_spec.rb
    ├── sauce_spec_chrome.rb
    ├── selector_spec.rb
    ├── selenium_spec_chrome.rb
    ├── selenium_spec_chrome_remote.rb
    ├── selenium_spec_edge.rb
    ├── selenium_spec_firefox.rb
    ├── selenium_spec_firefox_remote.rb
    ├── selenium_spec_ie.rb
    ├── selenium_spec_safari.rb
    ├── server_spec.rb
    ├── session_spec.rb
    ├── shared_selenium_node.rb
    ├── shared_selenium_session.rb
    ├── spec_helper.rb
    ├── whitespace_normalizer_spec.rb
    └── xpath_builder_spec.rb
Download .txt
SYMBOL INDEX (1728 symbols across 128 files)

FILE: lib/capybara.rb
  type Capybara (line 10) | module Capybara
    class CapybaraError (line 11) | class CapybaraError < StandardError; end
    class DriverNotFoundError (line 12) | class DriverNotFoundError < CapybaraError; end
    class FrozenInTime (line 13) | class FrozenInTime < CapybaraError; end
    class ElementNotFound (line 14) | class ElementNotFound < CapybaraError; end
    class ModalNotFound (line 15) | class ModalNotFound < CapybaraError; end
    class Ambiguous (line 16) | class Ambiguous < ElementNotFound; end
    class ExpectationNotMet (line 17) | class ExpectationNotMet < ElementNotFound; end
    class FileNotFound (line 18) | class FileNotFound < CapybaraError; end
    class UnselectNotAllowed (line 19) | class UnselectNotAllowed < CapybaraError; end
    class NotSupportedByDriverError (line 20) | class NotSupportedByDriverError < CapybaraError; end
    class InfiniteRedirectError (line 21) | class InfiniteRedirectError < CapybaraError; end
    class ScopeError (line 22) | class ScopeError < CapybaraError; end
    class WindowError (line 23) | class WindowError < CapybaraError; end
    class ReadOnlyElementError (line 24) | class ReadOnlyElementError < CapybaraError; end
    function configure (line 114) | def configure
    function register_driver (line 131) | def register_driver(name, &block)
    function register_server (line 150) | def register_server(name, &block)
    function add_selector (line 182) | def add_selector(name, **options, &block)
    function modify_selector (line 200) | def modify_selector(name, &block)
    function drivers (line 204) | def drivers
    function servers (line 208) | def servers
    function string (line 240) | def string(html)
    function run_default_server (line 253) | def run_default_server(app, port)
    function current_driver (line 261) | def current_driver
    function current_driver= (line 270) | def current_driver=(name)
    function use_default_driver (line 282) | def use_default_driver
    function using_driver (line 290) | def using_driver(driver)
    function using_wait_time (line 302) | def using_wait_time(seconds)
    function current_session (line 316) | def current_session
    function reset_sessions! (line 325) | def reset_sessions!
    function session_name (line 337) | def session_name
    function session_name= (line 346) | def session_name=(name)
    function using_session (line 358) | def using_session(name_or_session, &block)
    function HTML (line 390) | def HTML(html) # rubocop:disable Naming/MethodName
    function session_options (line 410) | def session_options
    function config (line 416) | def config
    function session_pool (line 420) | def session_pool
    function specified_session (line 426) | def specified_session
    function specified_session= (line 434) | def specified_session=(session)
    type Driver (line 447) | module Driver; end
    type RackTest (line 448) | module RackTest; end
    type Selenium (line 449) | module Selenium; end

FILE: lib/capybara/config.rb
  type Capybara (line 6) | module Capybara
    class Config (line 7) | class Config
      method initialize (line 22) | def initialize
      method threadsafe= (line 29) | def threadsafe=(bool)
      method server= (line 59) | def server=(name)
      method default_driver (line 74) | def default_driver
      method javascript_driver (line 82) | def javascript_driver
      method deprecate (line 86) | def deprecate(method, alternate_method, once: false)
      method allow_gumbo= (line 94) | def allow_gumbo=(val)
      method allow_gumbo (line 99) | def allow_gumbo

FILE: lib/capybara/driver/base.rb
  class Capybara::Driver::Base (line 3) | class Capybara::Driver::Base
    method current_url (line 6) | def current_url
    method visit (line 10) | def visit(path)
    method refresh (line 14) | def refresh
    method find_xpath (line 18) | def find_xpath(query, **options)
    method find_css (line 22) | def find_css(query, **options)
    method html (line 26) | def html
    method go_back (line 30) | def go_back
    method go_forward (line 34) | def go_forward
    method execute_script (line 38) | def execute_script(script, *args)
    method evaluate_script (line 42) | def evaluate_script(script, *args)
    method evaluate_async_script (line 46) | def evaluate_async_script(script, *args)
    method save_screenshot (line 50) | def save_screenshot(path, **options)
    method response_headers (line 54) | def response_headers
    method status_code (line 58) | def status_code
    method send_keys (line 62) | def send_keys(*)
    method active_element (line 66) | def active_element
    method switch_to_frame (line 74) | def switch_to_frame(frame)
    method frame_title (line 78) | def frame_title
    method frame_url (line 82) | def frame_url
    method current_window_handle (line 88) | def current_window_handle
    method window_size (line 92) | def window_size(handle)
    method resize_window_to (line 96) | def resize_window_to(handle, width, height)
    method maximize_window (line 100) | def maximize_window(handle)
    method fullscreen_window (line 104) | def fullscreen_window(handle)
    method close_window (line 108) | def close_window(handle)
    method window_handles (line 112) | def window_handles
    method open_new_window (line 116) | def open_new_window
    method switch_to_window (line 120) | def switch_to_window(handle)
    method no_such_window_error (line 124) | def no_such_window_error
    method accept_modal (line 138) | def accept_modal(type, **options, &blk)
    method dismiss_modal (line 151) | def dismiss_modal(type, **options, &blk)
    method invalid_element_errors (line 155) | def invalid_element_errors
    method wait? (line 159) | def wait?
    method reset! (line 163) | def reset!; end
    method needs_server? (line 165) | def needs_server?
    method session_options (line 169) | def session_options
    method session (line 175) | def session

FILE: lib/capybara/driver/node.rb
  type Capybara (line 3) | module Capybara
    type Driver (line 4) | module Driver
      class Node (line 5) | class Node
        method initialize (line 8) | def initialize(driver, native, initial_cache = {})
        method all_text (line 14) | def all_text
        method visible_text (line 18) | def visible_text
        method [] (line 22) | def [](name)
        method value (line 26) | def value
        method style (line 30) | def style(styles)
        method set (line 36) | def set(value, **options)
        method select_option (line 40) | def select_option
        method unselect_option (line 44) | def unselect_option
        method click (line 48) | def click(keys = [], **options)
        method right_click (line 52) | def right_click(keys = [], **options)
        method double_click (line 56) | def double_click(keys = [], **options)
        method send_keys (line 60) | def send_keys(*args)
        method hover (line 64) | def hover
        method drag_to (line 68) | def drag_to(element, **options)
        method drop (line 72) | def drop(*args)
        method scroll_by (line 76) | def scroll_by(x, y)
        method scroll_to (line 80) | def scroll_to(element, alignment, position = nil)
        method tag_name (line 84) | def tag_name
        method visible? (line 88) | def visible?
        method obscured? (line 92) | def obscured?
        method checked? (line 96) | def checked?
        method selected? (line 100) | def selected?
        method disabled? (line 104) | def disabled?
        method readonly? (line 108) | def readonly?
        method multiple? (line 112) | def multiple?
        method rect (line 116) | def rect
        method path (line 120) | def path
        method trigger (line 124) | def trigger(event)
        method shadow_root (line 128) | def shadow_root
        method inspect (line 132) | def inspect
        method == (line 138) | def ==(other)

FILE: lib/capybara/dsl.rb
  type Capybara (line 5) | module Capybara
    type DSL (line 6) | module DSL
      function included (line 7) | def self.included(base)
      function extended (line 12) | def self.extended(base)
      function using_session (line 21) | def using_session(name_or_session, &block)
      function using_wait_time (line 27) | def using_wait_time(seconds, &block)
      function page (line 45) | def page

FILE: lib/capybara/helpers.rb
  type Capybara (line 3) | module Capybara
    type Helpers (line 5) | module Helpers
      function normalize_whitespace (line 17) | def normalize_whitespace(text)
      function to_regexp (line 32) | def to_regexp(text, exact: false, all_whitespace: false, options: nil)
      function inject_asset_host (line 50) | def inject_asset_host(html, host: Capybara.asset_host)
      function declension (line 69) | def declension(singular, plural, count)
      function filter_backtrace (line 73) | def filter_backtrace(trace)
      function warn (line 84) | def warn(message, uplevel: 1)
      function monotonic_time (line 89) | def monotonic_time; Process.clock_gettime Process::CLOCK_MONOTONIC_R...
      function monotonic_time (line 91) | def monotonic_time; Process.clock_gettime Process::CLOCK_MONOTONIC_P...
      function monotonic_time (line 93) | def monotonic_time; Process.clock_gettime Process::CLOCK_MONOTONIC; end
      function monotonic_time (line 95) | def monotonic_time; Time.now.to_f; end
      function timer (line 98) | def timer(expire_in:)
      class Timer (line 102) | class Timer
        method initialize (line 103) | def initialize(expire_in)
        method expired? (line 108) | def expired?
        method stalled? (line 116) | def stalled?
        method current (line 122) | def current

FILE: lib/capybara/minitest.rb
  type Capybara (line 6) | module Capybara
    type Minitest (line 7) | module Minitest
      type Assertions (line 8) | module Assertions
        function determine_subject (line 380) | def determine_subject(args)
        function extract_locator (line 391) | def extract_locator(args)

FILE: lib/capybara/minitest/spec.rb
  type Capybara (line 5) | module Capybara
    type Minitest (line 6) | module Minitest
      type Expectations (line 7) | module Expectations
        function must_have_style (line 261) | def must_have_style(...)
  class Capybara::Session (line 269) | class Capybara::Session
  class Capybara::Node::Base (line 273) | class Capybara::Node::Base
  class Capybara::Node::Simple (line 277) | class Capybara::Node::Simple

FILE: lib/capybara/node/actions.rb
  type Capybara (line 3) | module Capybara
    type Node (line 4) | module Node
      type Actions (line 5) | module Actions
        function click_link_or_button (line 25) | def click_link_or_button(locator = nil, **options)
        function click_link (line 41) | def click_link(locator = nil, **options)
        function click_button (line 57) | def click_button(locator = nil, **options)
        function fill_in (line 88) | def fill_in(locator = nil, with:, currently_with: nil, fill_option...
        function choose (line 122) | def choose(locator = nil, **options)
        function check (line 150) | def check(locator = nil, **options)
        function uncheck (line 178) | def uncheck(locator = nil, **options)
        function select (line 201) | def select(value = nil, from: nil, **options)
        function unselect (line 230) | def unselect(value = nil, from: nil, **options)
        function attach_file (line 279) | def attach_file(locator = nil, paths, make_visible: nil, **options...
        function find_select_or_datalist_input (line 310) | def find_select_or_datalist_input(from, options)
        function select_datalist_option (line 324) | def select_datalist_option(input, value)
        function while_visible (line 337) | def while_visible(element, visible_css)
        function _update_style (line 353) | def _update_style(element, style)
        function _reset_style (line 359) | def _reset_style(element)
        function _check_with_label (line 364) | def _check_with_label(selector, checked, locator,

FILE: lib/capybara/node/base.rb
  type Capybara (line 3) | module Capybara
    type Node (line 4) | module Node
      class Base (line 25) | class Base
        method initialize (line 32) | def initialize(session, base)
        method reload (line 38) | def reload
        method synchronize (line 76) | def synchronize(seconds = nil, errors: nil)
        method find_css (line 106) | def find_css(css, **options)
        method find_xpath (line 115) | def find_xpath(xpath, **options)
        method session_options (line 124) | def session_options
        method to_capybara_node (line 128) | def to_capybara_node
        method catch_error? (line 134) | def catch_error?(error, errors = nil)
        method driver (line 139) | def driver

FILE: lib/capybara/node/document.rb
  type Capybara (line 3) | module Capybara
    type Node (line 4) | module Node
      class Document (line 12) | class Document < Base
        method inspect (line 15) | def inspect
        method text (line 23) | def text(type = nil, normalize_ws: false)
        method title (line 31) | def title
        method execute_script (line 35) | def execute_script(*args)
        method evaluate_script (line 39) | def evaluate_script(*args)
        method scroll_to (line 43) | def scroll_to(*args, quirks: false, **options)

FILE: lib/capybara/node/document_matchers.rb
  type Capybara (line 3) | module Capybara
    type Node (line 4) | module Node
      type DocumentMatchers (line 5) | module DocumentMatchers
        function assert_title (line 19) | def assert_title(title, **options)
        function assert_no_title (line 32) | def assert_no_title(title, **options)
        function has_title? (line 44) | def has_title?(title, **options)
        function has_no_title? (line 54) | def has_no_title?(title, **options)
        function _verify_title (line 60) | def _verify_title(title, options)

FILE: lib/capybara/node/element.rb
  type Capybara (line 3) | module Capybara
    type Node (line 4) | module Node
      class Element (line 24) | class Element < Base
        method initialize (line 25) | def initialize(session, base, query_scope, query)
        method allow_reload! (line 33) | def allow_reload!(idx = nil)
        method native (line 42) | def native
        method text (line 58) | def text(type = nil, normalize_ws: false)
        method [] (line 73) | def [](attribute)
        method style (line 86) | def style(*styles)
        method value (line 105) | def value
        method set (line 117) | def set(value, **options)
        method select_option (line 139) | def select_option(wait: nil)
        method unselect_option (line 150) | def unselect_option(wait: nil)
        method click (line 170) | def click(*keys, **options)
        method right_click (line 184) | def right_click(*keys, **options)
        method double_click (line 197) | def double_click(*keys, **options)
        method send_keys (line 274) | def send_keys(*args)
        method hover (line 284) | def hover
        method tag_name (line 293) | def tag_name
        method visible? (line 305) | def visible?
        method obscured? (line 316) | def obscured?
        method checked? (line 326) | def checked?
        method selected? (line 336) | def selected?
        method disabled? (line 346) | def disabled?
        method readonly? (line 356) | def readonly?
        method multiple? (line 366) | def multiple?
        method path (line 376) | def path
        method rect (line 380) | def rect
        method trigger (line 394) | def trigger(event)
        method drag_to (line 418) | def drag_to(node, **options)
        method drop (line 437) | def drop(*args)
        method scroll_to (line 462) | def scroll_to(pos_or_el_or_x, y = nil, align: :top, offset: nil)
        method shadow_root (line 481) | def shadow_root
        method execute_script (line 495) | def execute_script(script, *args)
        method evaluate_script (line 512) | def evaluate_script(script, *args)
        method evaluate_async_script (line 529) | def evaluate_async_script(script, *args)
        method flash (line 542) | def flash
        method reload (line 560) | def reload
        method inspect (line 577) | def inspect
        method initial_cache (line 586) | def initial_cache
        method perform_click_action (line 604) | def perform_click_action(keys, wait: nil, **options)

FILE: lib/capybara/node/finders.rb
  type Capybara (line 3) | module Capybara
    type Node (line 4) | module Node
      type Finders (line 5) | module Finders
        function find (line 51) | def find(*args, **options, &optional_filter_block)
        function ancestor (line 81) | def ancestor(*args, **options, &optional_filter_block)
        function sibling (line 104) | def sibling(*args, **options, &optional_filter_block)
        function find_field (line 135) | def find_field(locator = nil, **options, &optional_filter_block)
        function find_link (line 157) | def find_link(locator = nil, **options, &optional_filter_block)
        function find_button (line 184) | def find_button(locator = nil, **options, &optional_filter_block)
        function find_by_id (line 198) | def find_by_id(id, **options, &optional_filter_block)
        function all (line 257) | def all(*args, allow_reload: false, **options, &optional_filter_bl...
        function first (line 293) | def first(*args, **options, &optional_filter_block)
        function synced_resolve (line 300) | def synced_resolve(query)
        function ambiguous? (line 318) | def ambiguous?(query, result)
        function prefer_exact? (line 322) | def prefer_exact?(query)
        function options_include_minimum? (line 326) | def options_include_minimum?(opts)
        function parent (line 330) | def parent

FILE: lib/capybara/node/matchers.rb
  type Capybara (line 3) | module Capybara
    type Node (line 4) | module Node
      type Matchers (line 5) | module Matchers
        function has_selector? (line 38) | def has_selector?(*args, **options, &optional_filter_block)
        function has_no_selector? (line 50) | def has_no_selector?(*args, **options, &optional_filter_block)
        function matches_style? (line 63) | def matches_style?(styles = nil, **options)
        function has_style? (line 71) | def has_style?(styles = nil, **options)
        function assert_selector (line 109) | def assert_selector(*args, &optional_filter_block)
        function assert_matches_style (line 126) | def assert_matches_style(styles = nil, **options)
        function assert_style (line 139) | def assert_style(styles = nil, **options)
        function assert_all_of_selectors (line 159) | def assert_all_of_selectors(*args, **options, &optional_filter_block)
        function assert_none_of_selectors (line 180) | def assert_none_of_selectors(*args, **options, &optional_filter_bl...
        function assert_any_of_selectors (line 201) | def assert_any_of_selectors(*args, wait: nil, **options, &optional...
        function assert_no_selector (line 233) | def assert_no_selector(*args, &optional_filter_block)
        function has_xpath? (line 270) | def has_xpath?(path, **options, &optional_filter_block)
        function has_no_xpath? (line 282) | def has_no_xpath?(path, **options, &optional_filter_block)
        function has_css? (line 309) | def has_css?(path, **options, &optional_filter_block)
        function has_no_css? (line 321) | def has_no_css?(path, **options, &optional_filter_block)
        function has_element? (line 334) | def has_element?(locator = nil, **options, &optional_filter_block)
        function has_no_element? (line 346) | def has_no_element?(locator = nil, **options, &optional_filter_block)
        function has_link? (line 359) | def has_link?(locator = nil, **options, &optional_filter_block)
        function has_no_link? (line 371) | def has_no_link?(locator = nil, **options, &optional_filter_block)
        function has_button? (line 383) | def has_button?(locator = nil, **options, &optional_filter_block)
        function has_no_button? (line 395) | def has_no_button?(locator = nil, **options, &optional_filter_block)
        function has_field? (line 421) | def has_field?(locator = nil, **options, &optional_filter_block)
        function has_no_field? (line 435) | def has_no_field?(locator = nil, **options, &optional_filter_block)
        function has_checked_field? (line 448) | def has_checked_field?(locator = nil, **options, &optional_filter_...
        function has_no_checked_field? (line 461) | def has_no_checked_field?(locator = nil, **options, &optional_filt...
        function has_unchecked_field? (line 474) | def has_unchecked_field?(locator = nil, **options, &optional_filte...
        function has_no_unchecked_field? (line 487) | def has_no_unchecked_field?(locator = nil, **options, &optional_fi...
        function has_select? (line 520) | def has_select?(locator = nil, **options, &optional_filter_block)
        function has_no_select? (line 532) | def has_no_select?(locator = nil, **options, &optional_filter_block)
        function has_table? (line 554) | def has_table?(locator = nil, **options, &optional_filter_block)
        function has_no_table? (line 566) | def has_no_table?(locator = nil, **options, &optional_filter_block)
        function assert_matches_selector (line 586) | def assert_matches_selector(*args, &optional_filter_block)
        function assert_not_matches_selector (line 600) | def assert_not_matches_selector(*args, &optional_filter_block)
        function matches_selector? (line 613) | def matches_selector?(*args, **options, &optional_filter_block)
        function matches_xpath? (line 624) | def matches_xpath?(xpath, **options, &optional_filter_block)
        function matches_css? (line 635) | def matches_css?(css, **options, &optional_filter_block)
        function not_matches_selector? (line 647) | def not_matches_selector?(*args, **options, &optional_filter_block)
        function not_matches_xpath? (line 658) | def not_matches_xpath?(xpath, **options, &optional_filter_block)
        function not_matches_css? (line 669) | def not_matches_css?(css, **options, &optional_filter_block)
        function assert_text (line 700) | def assert_text(type_or_text, *args, **opts)
        function assert_no_text (line 716) | def assert_no_text(type_or_text, *args, **opts)
        function has_text? (line 738) | def has_text?(*args, **options)
        function has_no_text? (line 750) | def has_no_text?(*args, **options)
        function assert_ancestor (line 766) | def assert_ancestor(*args, &optional_filter_block)
        function assert_no_ancestor (line 774) | def assert_no_ancestor(*args, &optional_filter_block)
        function has_ancestor? (line 786) | def has_ancestor?(*args, **options, &optional_filter_block)
        function has_no_ancestor? (line 794) | def has_no_ancestor?(*args, **options, &optional_filter_block)
        function assert_sibling (line 809) | def assert_sibling(*args, &optional_filter_block)
        function assert_no_sibling (line 817) | def assert_no_sibling(*args, &optional_filter_block)
        function has_sibling? (line 829) | def has_sibling?(*args, **options, &optional_filter_block)
        function has_no_sibling? (line 837) | def has_no_sibling?(*args, **options, &optional_filter_block)
        function == (line 841) | def ==(other)
        function extract_selector (line 847) | def extract_selector(args)
        function _verify_multiple (line 851) | def _verify_multiple(*args, wait: nil, **options)
        function _verify_selector_result (line 859) | def _verify_selector_result(query_args, optional_filter_block, que...
        function _verify_match_result (line 874) | def _verify_match_result(query_args, optional_filter_block)
        function _verify_text (line 883) | def _verify_text(type = nil, expected_text, **query_options) # rub...
        function _set_query_session_options (line 892) | def _set_query_session_options(*query_args)
        function make_predicate (line 900) | def make_predicate(options)

FILE: lib/capybara/node/simple.rb
  type Capybara (line 3) | module Capybara
    type Node (line 4) | module Node
      class Simple (line 15) | class Simple
        method initialize (line 22) | def initialize(native)
        method text (line 31) | def text(_type = nil, normalize_ws: false)
        method [] (line 45) | def [](name)
        method tag_name (line 60) | def tag_name
        method path (line 70) | def path
        method value (line 78) | def value
        method visible? (line 103) | def visible?(check_ancestors = true) # rubocop:disable Style/Optio...
        method checked? (line 123) | def checked?
        method disabled? (line 132) | def disabled?
        method selected? (line 143) | def selected?
        method multiple? (line 147) | def multiple?
        method readonly? (line 151) | def readonly?
        method synchronize (line 155) | def synchronize(_seconds = nil)
        method allow_reload! (line 159) | def allow_reload!(*)
        method title (line 166) | def title
        method inspect (line 170) | def inspect
        method find_css (line 175) | def find_css(css, **_options)
        method find_xpath (line 180) | def find_xpath(xpath, **_options)
        method session_options (line 185) | def session_options
        method initial_cache (line 190) | def initial_cache
        method == (line 194) | def ==(other)
        method option_value (line 200) | def option_value(option)

FILE: lib/capybara/node/whitespace_normalizer.rb
  type Capybara (line 3) | module Capybara
    type Node (line 4) | module Node
      type WhitespaceNormalizer (line 12) | module WhitespaceNormalizer
        function normalize_spacing (line 53) | def normalize_spacing(text)
        function normalize_visible_spacing (line 71) | def normalize_visible_spacing(text)

FILE: lib/capybara/queries/active_element_query.rb
  type Capybara (line 3) | module Capybara
    type Queries (line 5) | module Queries
      class ActiveElementQuery (line 6) | class ActiveElementQuery < BaseQuery
        method initialize (line 7) | def initialize(**options)
        method resolve_for (line 12) | def resolve_for(session)

FILE: lib/capybara/queries/ancestor_query.rb
  type Capybara (line 3) | module Capybara
    type Queries (line 4) | module Queries
      class AncestorQuery (line 5) | class AncestorQuery < Capybara::Queries::SelectorQuery
        method resolve_for (line 7) | def resolve_for(node, exact = nil)
        method description (line 20) | def description(applied = false) # rubocop:disable Style/OptionalB...

FILE: lib/capybara/queries/base_query.rb
  type Capybara (line 3) | module Capybara
    type Queries (line 5) | module Queries
      class BaseQuery (line 6) | class BaseQuery
        method initialize (line 12) | def initialize(options)
        method session_options (line 16) | def session_options
        method wait (line 20) | def wait
        method wait (line 24) | def self.wait(options, default = Capybara.default_max_wait_time)
        method expects_none? (line 36) | def expects_none?
        method matches_count? (line 49) | def matches_count?(count)
        method failure_message (line 62) | def failure_message
        method negative_failure_message (line 66) | def negative_failure_message
        method count_specified? (line 72) | def count_specified?
        method count_message (line 76) | def count_message
        method occurrences (line 92) | def occurrences(count)
        method assert_valid_keys (line 96) | def assert_valid_keys

FILE: lib/capybara/queries/current_path_query.rb
  type Capybara (line 5) | module Capybara
    type Queries (line 7) | module Queries
      class CurrentPathQuery (line 8) | class CurrentPathQuery < BaseQuery
        method initialize (line 9) | def initialize(expected_path, **options, &optional_filter_block)
        method resolves_for? (line 20) | def resolves_for?(session)
        method failure_message (line 35) | def failure_message
        method negative_failure_message (line 39) | def negative_failure_message
        method matches_filter_block? (line 45) | def matches_filter_block?(url)
        method failure_message_helper (line 51) | def failure_message_helper(negated = '')
        method valid_keys (line 56) | def valid_keys

FILE: lib/capybara/queries/match_query.rb
  type Capybara (line 3) | module Capybara
    type Queries (line 4) | module Queries
      class MatchQuery (line 5) | class MatchQuery < Capybara::Queries::SelectorQuery
        method visible (line 6) | def visible
        method assert_valid_keys (line 12) | def assert_valid_keys
        method valid_keys (line 21) | def valid_keys

FILE: lib/capybara/queries/selector_query.rb
  type Capybara (line 5) | module Capybara
    type Queries (line 6) | module Queries
      class SelectorQuery (line 7) | class SelectorQuery < Queries::BaseQuery
        method initialize (line 15) | def initialize(*args,
        method name (line 61) | def name; selector.name; end
        method label (line 62) | def label; selector.label || selector.name; end
        method description (line 64) | def description(only_applied = false) # rubocop:disable Style/Opti...
        method applied_description (line 114) | def applied_description
        method matches_filters? (line 118) | def matches_filters?(node, node_filter_errors = [])
        method visible (line 130) | def visible
        method exact? (line 138) | def exact?
        method match (line 142) | def match
        method xpath (line 146) | def xpath(exact = nil)
        method css (line 155) | def css
        method resolve_for (line 160) | def resolve_for(node, exact = nil)
        method supports_exact? (line 173) | def supports_exact?
        method failure_message (line 179) | def failure_message
        method negative_failure_message (line 183) | def negative_failure_message
        method selector_format (line 189) | def selector_format
        method matching_text (line 193) | def matching_text
        method text_fragments (line 197) | def text_fragments
        method xpath_text_conditions (line 201) | def xpath_text_conditions
        method try_text_match_in_expression? (line 214) | def try_text_match_in_expression?
        method first_try? (line 221) | def first_try?
        method show_for_stage (line 225) | def show_for_stage(only_applied)
        method applied_filters (line 231) | def applied_filters
        method find_selector (line 235) | def find_selector(locator)
        method find_nodes_by_selector_format (line 242) | def find_nodes_by_selector_format(node, exact)
        method to_element (line 267) | def to_element(node)
        method valid_keys (line 275) | def valid_keys
        method matches_node_filters? (line 279) | def matches_node_filters?(node, errors)
        method matches_filter_block? (line 304) | def matches_filter_block?(node)
        method filter_set (line 314) | def filter_set(name)
        method node_filters (line 318) | def node_filters
        method expression_filters (line 326) | def expression_filters
        method ordered_results (line 332) | def ordered_results(results)
        method custom_keys (line 341) | def custom_keys
        method assert_valid_keys (line 345) | def assert_valid_keys
        method filtered_expression (line 363) | def filtered_expression(expr)
        method use_default_id_filter? (line 371) | def use_default_id_filter?
        method use_default_class_filter? (line 375) | def use_default_class_filter?
        method use_default_style_filter? (line 379) | def use_default_style_filter?
        method use_default_focused_filter? (line 383) | def use_default_focused_filter?
        method use_spatial_filter? (line 387) | def use_spatial_filter?
        method apply_expression_filters (line 391) | def apply_expression_filters(expression)
        method warn_exact_usage (line 412) | def warn_exact_usage
        method exact_text (line 418) | def exact_text
        method describe_within? (line 422) | def describe_within?
        method document? (line 426) | def document?(node)
        method simple_root? (line 430) | def simple_root?(node)
        method apply_filter? (line 434) | def apply_filter?(filter)
        method matches_locator_filter? (line 438) | def matches_locator_filter?(node)
        method matches_system_filters? (line 444) | def matches_system_filters?(node)
        method matches_spatial_filters? (line 456) | def matches_spatial_filters?(node)
        method matches_id_filter? (line 492) | def matches_id_filter?(node)
        method matches_class_filter? (line 498) | def matches_class_filter?(node)
        method matches_focused_filter? (line 511) | def matches_focused_filter?(node)
        method need_to_process_classes? (line 517) | def need_to_process_classes?
        method matches_style_filter? (line 526) | def matches_style_filter?(node)
        method matches_style? (line 537) | def matches_style?(node, styles)
        method matches_text_filter? (line 548) | def matches_text_filter?(node)
        method matches_exact_text_filter? (line 557) | def matches_exact_text_filter?(node)
        method matches_visibility_filters? (line 566) | def matches_visibility_filters?(node)
        method matches_text_exactly? (line 591) | def matches_text_exactly?(node, value)
        method normalize_ws (line 596) | def normalize_ws
        method matches_text_regexp (line 600) | def matches_text_regexp(node, regexp)
        method matches_text_regexp? (line 606) | def matches_text_regexp?(node, regexp)
        method default_visibility (line 610) | def default_visibility
        method builder (line 614) | def builder(expr)
        method position_cache (line 618) | def position_cache(key)
        method rect_cache (line 622) | def rect_cache(key)
        class Rectangle (line 626) | class Rectangle
          method initialize (line 629) | def initialize(position)
          method distance (line 638) | def distance(other)
          method above? (line 653) | def above?(other)
          method below? (line 657) | def below?(other)
          method left_of? (line 661) | def left_of?(other)
          method right_of? (line 665) | def right_of?(other)
          method near? (line 669) | def near?(other)
          method line_segments (line 675) | def line_segments
          method distance_segment_segment (line 686) | def distance_segment_segment(l1p1, l1p2, l2p1, l2p2)

FILE: lib/capybara/queries/sibling_query.rb
  type Capybara (line 3) | module Capybara
    type Queries (line 4) | module Queries
      class SiblingQuery (line 5) | class SiblingQuery < SelectorQuery
        method resolve_for (line 7) | def resolve_for(node, exact = nil)
        method description (line 19) | def description(applied = false) # rubocop:disable Style/OptionalB...

FILE: lib/capybara/queries/style_query.rb
  type Capybara (line 3) | module Capybara
    type Queries (line 5) | module Queries
      class StyleQuery (line 6) | class StyleQuery < BaseQuery
        method initialize (line 7) | def initialize(expected_styles, session_options:, **options)
        method resolves_for? (line 17) | def resolves_for?(node)
        method failure_message (line 29) | def failure_message
        method stringify_keys (line 36) | def stringify_keys(hsh)
        method valid_keys (line 40) | def valid_keys

FILE: lib/capybara/queries/text_query.rb
  type Capybara (line 3) | module Capybara
    type Queries (line 5) | module Queries
      class TextQuery (line 6) | class TextQuery < BaseQuery
        method initialize (line 7) | def initialize(type = nil, expected_text, session_options:, **opti...
        method resolve_for (line 27) | def resolve_for(node)
        method failure_message (line 33) | def failure_message
        method negative_failure_message (line 37) | def negative_failure_message
        method description (line 41) | def description
        method exact? (line 51) | def exact?
        method build_message (line 55) | def build_message(report_on_invisible)
        method case_insensitive_message (line 71) | def case_insensitive_message
        method invisible_message (line 79) | def invisible_message
        method valid_keys (line 90) | def valid_keys
        method valid_types (line 94) | def valid_types
        method check_visible_text? (line 98) | def check_visible_text?
        method check_case_insensitive? (line 102) | def check_case_insensitive?
        method text (line 106) | def text(node: @node, query_type: @type)
        method default_type (line 111) | def default_type

FILE: lib/capybara/queries/title_query.rb
  type Capybara (line 3) | module Capybara
    type Queries (line 5) | module Queries
      class TitleQuery (line 6) | class TitleQuery < BaseQuery
        method initialize (line 7) | def initialize(expected_title, **options)
        method resolves_for? (line 15) | def resolves_for?(node)
        method failure_message (line 19) | def failure_message
        method negative_failure_message (line 23) | def negative_failure_message
        method failure_message_helper (line 29) | def failure_message_helper(negated = '')
        method valid_keys (line 34) | def valid_keys

FILE: lib/capybara/rack_test/browser.rb
  class Capybara::RackTest::Browser (line 3) | class Capybara::RackTest::Browser
    method initialize (line 9) | def initialize(driver)
    method app (line 14) | def app
    method options (line 18) | def options
    method visit (line 22) | def visit(path, **attributes)
    method refresh (line 29) | def refresh
    method submit (line 34) | def submit(method, path, attributes, content_type: nil)
    method follow (line 48) | def follow(method, path, **attributes)
    method process_and_follow_redirects (line 54) | def process_and_follow_redirects(method, path, attributes = {}, env = {})
    method process (line 74) | def process(method, path, attributes = {}, env = {})
    method build_uri (line 84) | def build_uri(path)
    method current_url (line 100) | def current_url
    method reset_host! (line 108) | def reset_host!
    method reset_cache! (line 113) | def reset_cache!
    method dom (line 117) | def dom
    method find (line 121) | def find(format, selector)
    method html (line 129) | def html
    method title (line 135) | def title
    method last_request (line 139) | def last_request
    method last_response (line 145) | def last_response
    method base_href (line 153) | def base_href
    method base_relative_uri_for (line 157) | def base_relative_uri_for(uri)
    method build_rack_mock_session (line 172) | def build_rack_mock_session
    method request_path (line 177) | def request_path
    method safe_last_request (line 183) | def safe_last_request
    method fragment_or_script? (line 191) | def fragment_or_script?(path)
    method referer_url (line 195) | def referer_url

FILE: lib/capybara/rack_test/css_handlers.rb
  class Capybara::RackTest::CSSHandlers (line 3) | class Capybara::RackTest::CSSHandlers < BasicObject
    method disabled (line 6) | def disabled(list)
    method enabled (line 10) | def enabled(list)

FILE: lib/capybara/rack_test/driver.rb
  class Capybara::RackTest::Driver (line 8) | class Capybara::RackTest::Driver < Capybara::Driver::Base
    method initialize (line 16) | def initialize(app, **options)
    method browser (line 24) | def browser
    method follow_redirects? (line 28) | def follow_redirects?
    method redirect_limit (line 32) | def redirect_limit
    method response (line 36) | def response
    method request (line 40) | def request
    method visit (line 44) | def visit(path, **attributes)
    method refresh (line 48) | def refresh
    method submit (line 52) | def submit(method, path, attributes)
    method follow (line 56) | def follow(method, path, **attributes)
    method current_url (line 60) | def current_url
    method response_headers (line 64) | def response_headers
    method status_code (line 68) | def status_code
    method find_xpath (line 72) | def find_xpath(selector)
    method find_css (line 76) | def find_css(selector)
    method html (line 84) | def html
    method dom (line 88) | def dom
    method title (line 92) | def title
    method reset! (line 96) | def reset!
    method get (line 100) | def get(...); browser.get(...); end
    method post (line 101) | def post(...); browser.post(...); end
    method put (line 102) | def put(...); browser.put(...); end
    method delete (line 103) | def delete(...); browser.delete(...); end
    method header (line 104) | def header(key, value); browser.header(key, value); end
    method invalid_element_errors (line 106) | def invalid_element_errors

FILE: lib/capybara/rack_test/errors.rb
  type Capybara::RackTest::Errors (line 3) | module Capybara::RackTest::Errors
    class StaleElementReferenceError (line 4) | class StaleElementReferenceError < StandardError

FILE: lib/capybara/rack_test/form.rb
  class Capybara::RackTest::Form (line 3) | class Capybara::RackTest::Form < Capybara::RackTest::Node
    class NilUploadedFile (line 8) | class NilUploadedFile < Rack::Test::UploadedFile
      method initialize (line 9) | def initialize # rubocop:disable Lint/MissingSuper
      method original_filename (line 14) | def original_filename; ''; end
      method content_type (line 15) | def content_type; 'application/octet-stream'; end
      method path (line 16) | def path; @empty_file.path; end
      method size (line 17) | def size; 0; end
      method read (line 18) | def read; ''; end
      method append_to (line 19) | def append_to(_); end
      method set_encoding (line 20) | def set_encoding(_); end
    method params (line 23) | def params(button)
    method submit (line 54) | def submit(button)
    method multipart? (line 60) | def multipart?
    class ParamsHash (line 66) | class ParamsHash < Hash
      method to_params_hash (line 67) | def to_params_hash
    method request_method (line 72) | def request_method
    method merge_param! (line 76) | def merge_param!(params, key, value)
    method make_params (line 85) | def make_params
    method add_input_param (line 93) | def add_input_param(field, params)
    method file_to_upload (line 117) | def file_to_upload(filename)
    method add_select_param (line 126) | def add_select_param(field, params)
    method add_textarea_param (line 141) | def add_textarea_param(field, params)
    method submitter? (line 146) | def submitter?(el)

FILE: lib/capybara/rack_test/node.rb
  class Capybara::RackTest::Node (line 6) | class Capybara::RackTest::Node < Capybara::Driver::Node
    method all_text (line 11) | def all_text
    method visible_text (line 15) | def visible_text
    method [] (line 19) | def [](name)
    method style (line 23) | def style(_styles)
    method value (line 27) | def value
    method set (line 31) | def set(value, **options)
    method select_option (line 48) | def select_option
    method unselect_option (line 55) | def unselect_option
    method click (line 61) | def click(keys = [], **options)
    method tag_name (line 79) | def tag_name
    method visible? (line 83) | def visible?
    method checked? (line 87) | def checked?
    method selected? (line 91) | def selected?
    method disabled? (line 95) | def disabled?
    method readonly? (line 105) | def readonly?
    method path (line 112) | def path
    method find_xpath (line 116) | def find_xpath(locator, **_hints)
    method find_css (line 120) | def find_css(locator, **_hints)
    method displayed_text (line 139) | def displayed_text(check_ancestor: true)
    method stale_check (line 161) | def stale_check
    method deselect_options (line 165) | def deselect_options
    method string_node (line 169) | def string_node
    method select_node (line 174) | def select_node
    method type (line 178) | def type
    method form (line 182) | def form
    method set_radio (line 190) | def set_radio(_value) # rubocop:disable Naming/AccessorMethodName
    method set_checkbox (line 196) | def set_checkbox(value) # rubocop:disable Naming/AccessorMethodName
    method set_range (line 204) | def set_range(value) # rubocop:disable Naming/AccessorMethodName
    method set_input (line 212) | def set_input(value) # rubocop:disable Naming/AccessorMethodName
    method attribute_is_not_blank? (line 238) | def attribute_is_not_blank?(attribute)
    method follow_link (line 242) | def follow_link
    method click_label (line 248) | def click_label
    method toggle_details (line 258) | def toggle_details(details = nil)
    method link? (line 269) | def link?
    method submits? (line 273) | def submits?
    method checkable? (line 277) | def checkable?
    method checkbox_or_radio? (line 283) | def checkbox_or_radio?(field = self)
    method checkbox? (line 287) | def checkbox?
    method radio? (line 291) | def radio?
    method text_or_password? (line 295) | def text_or_password?
    method input_field? (line 299) | def input_field?
    method textarea? (line 303) | def textarea?
    method range? (line 307) | def range?

FILE: lib/capybara/registration_container.rb
  type Capybara (line 3) | module Capybara
    class RegistrationContainer (line 5) | class RegistrationContainer
      method names (line 6) | def names
      method [] (line 10) | def [](name)
      method []= (line 14) | def []=(name, value)
      method method_missing (line 19) | def method_missing(method_name, ...)
      method respond_to_missing? (line 27) | def respond_to_missing?(method_name, include_all)
      method initialize (line 33) | def initialize
      method register (line 37) | def register(name, block)

FILE: lib/capybara/registrations/patches/puma_ssl.rb
  type Puma (line 3) | module Puma
    type MiniSSL (line 4) | module MiniSSL
      class Socket (line 5) | class Socket
        method read_nonblock (line 6) | def read_nonblock(size, *_)

FILE: lib/capybara/result.rb
  type Capybara (line 5) | module Capybara
    class Result (line 24) | class Result
      method initialize (line 28) | def initialize(elements, query)
      method each (line 41) | def each(&block)
      method [] (line 53) | def [](*args)
      method empty? (line 80) | def empty?
      method compare_count (line 84) | def compare_count
      method matches_count? (line 109) | def matches_count?
      method failure_message (line 113) | def failure_message
      method negative_failure_message (line 129) | def negative_failure_message
      method unfiltered_size (line 133) | def unfiltered_size
      method allow_reload! (line 140) | def allow_reload!
      method add_to_cache (line 147) | def add_to_cache(elem)
      method load_up_to (line 152) | def load_up_to(num)
      method full_results (line 161) | def full_results
      method rest (line 166) | def rest
      method lazy_select_elements (line 177) | def lazy_select_elements(&block)
      method lazy_select_elements (line 181) | def lazy_select_elements(&block)

FILE: lib/capybara/rspec/matcher_proxies.rb
  type Capybara (line 3) | module Capybara
    type RSpecMatcherProxies (line 4) | module RSpecMatcherProxies
      function all (line 5) | def all(*args, **kwargs, &block)
      function within (line 13) | def within(*args, **kwargs, &block)
  type Capybara::DSL (line 25) | module Capybara::DSL
    function included (line 29) | def included(base)
  type ::RSpec::Matchers (line 40) | module ::RSpec::Matchers
    function included (line 41) | def self.included(base)
  type Capybara::DSLRSpecProxyInstaller (line 49) | module Capybara::DSLRSpecProxyInstaller
    type ClassMethods (line 50) | module ClassMethods
      function included (line 51) | def included(base)
    function prepended (line 57) | def self.prepended(base)
  type Capybara::RSpecMatcherProxyInstaller (line 64) | module Capybara::RSpecMatcherProxyInstaller
    type ClassMethods (line 65) | module ClassMethods
      function included (line 66) | def included(base)
    function prepended (line 72) | def self.prepended(base)

FILE: lib/capybara/rspec/matchers.rb
  type Capybara (line 13) | module Capybara
    type RSpecMatchers (line 14) | module RSpecMatchers
      function have_selector (line 18) | def have_selector(...)
      function have_all_of_selectors (line 25) | def have_all_of_selectors(...)
      function have_none_of_selectors (line 32) | def have_none_of_selectors(...)
      function have_any_of_selectors (line 39) | def have_any_of_selectors(...)
      function match_selector (line 46) | def match_selector(...)
      function have_text (line 135) | def have_text(text_or_type, *args, **options)
      function have_title (line 140) | def have_title(title, **options)
      function have_current_path (line 147) | def have_current_path(path, **options, &optional_filter_block)
      function match_style (line 154) | def match_style(styles = nil, **options)
      function have_style (line 162) | def have_style(styles = nil, **options)
      function have_sibling (line 185) | def have_sibling(...)
      function have_ancestor (line 192) | def have_ancestor(...)
      function become_closed (line 203) | def become_closed(**options)

FILE: lib/capybara/rspec/matchers/base.rb
  type Capybara (line 7) | module Capybara
    type RSpecMatchers (line 8) | module RSpecMatchers
      type Matchers (line 9) | module Matchers
        class Base (line 10) | class Base
          method initialize (line 15) | def initialize(*args, **kw_args, &filter_block)
          method session_query_args (line 23) | def session_query_args
          method session_query_options (line 32) | def session_query_options
          method session_options (line 37) | def session_options
        class WrappedElementMatcher (line 49) | class WrappedElementMatcher < Base
          method matches? (line 50) | def matches?(actual, &filter_block)
          method does_not_match? (line 58) | def does_not_match?(actual, &filter_block)
          method wrap (line 68) | def wrap(actual)
        class CountableWrappedElementMatcher (line 78) | class CountableWrappedElementMatcher < WrappedElementMatcher
        class NegatedMatcher (line 83) | class NegatedMatcher
          method initialize (line 86) | def initialize(matcher)
          method matches? (line 91) | def matches?(actual, &filter_block)
          method does_not_match? (line 95) | def does_not_match?(actual, &filter_block)
          method description (line 99) | def description
          method failure_message (line 103) | def failure_message
          method failure_message_when_negated (line 107) | def failure_message_when_negated

FILE: lib/capybara/rspec/matchers/become_closed.rb
  type Capybara (line 3) | module Capybara
    type RSpecMatchers (line 4) | module RSpecMatchers
      type Matchers (line 5) | module Matchers
        class BecomeClosed (line 6) | class BecomeClosed
          method initialize (line 7) | def initialize(options)
          method matches? (line 11) | def matches?(window)
          method failure_message (line 23) | def failure_message
          method failure_message_when_negated (line 27) | def failure_message_when_negated

FILE: lib/capybara/rspec/matchers/compound.rb
  type Capybara (line 4) | module Capybara
    type RSpecMatchers (line 5) | module RSpecMatchers
      type Matchers (line 6) | module Matchers
        type Compound (line 7) | module Compound
          function and (line 10) | def and(matcher)
          function and_then (line 14) | def and_then(matcher)
          function or (line 18) | def or(matcher)
          class CapybaraEvaluator (line 22) | class CapybaraEvaluator
            method initialize (line 23) | def initialize(actual)
            method matcher_matches? (line 28) | def matcher_matches?(matcher)
            method reset (line 32) | def reset
          type Synchronizer (line 38) | module Synchronizer
            function match (line 39) | def match(_expected, actual)
            function sync_element (line 54) | def sync_element(el)
          class And (line 65) | class And < ::RSpec::Matchers::BuiltIn::Compound::And
            method synchronized_match? (line 70) | def synchronized_match?
          class Or (line 75) | class Or < ::RSpec::Matchers::BuiltIn::Compound::Or
            method synchronized_match? (line 80) | def synchronized_match?

FILE: lib/capybara/rspec/matchers/count_sugar.rb
  type Capybara (line 3) | module Capybara
    type RSpecMatchers (line 4) | module RSpecMatchers
      type CountSugar (line 5) | module CountSugar
        function once (line 6) | def once; exactly(1); end
        function twice (line 7) | def twice; exactly(2); end
        function thrice (line 8) | def thrice; exactly(3); end
        function exactly (line 10) | def exactly(number)
        function at_most (line 15) | def at_most(number)
        function at_least (line 20) | def at_least(number)
        function times (line 25) | def times
        function options (line 31) | def options

FILE: lib/capybara/rspec/matchers/have_ancestor.rb
  type Capybara (line 5) | module Capybara
    type RSpecMatchers (line 6) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class HaveAncestor (line 8) | class HaveAncestor < CountableWrappedElementMatcher
          method element_matches? (line 9) | def element_matches?(el)
          method element_does_not_match? (line 13) | def element_does_not_match?(el)
          method description (line 17) | def description
          method query (line 21) | def query

FILE: lib/capybara/rspec/matchers/have_current_path.rb
  type Capybara (line 5) | module Capybara
    type RSpecMatchers (line 6) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class HaveCurrentPath (line 8) | class HaveCurrentPath < WrappedElementMatcher
          method element_matches? (line 9) | def element_matches?(el)
          method element_does_not_match? (line 13) | def element_does_not_match?(el)
          method description (line 17) | def description
          method current_path (line 23) | def current_path

FILE: lib/capybara/rspec/matchers/have_selector.rb
  type Capybara (line 7) | module Capybara
    type RSpecMatchers (line 8) | module RSpecMatchers
      type Matchers (line 9) | module Matchers
        class HaveSelector (line 10) | class HaveSelector < CountableWrappedElementMatcher
          method initialize (line 11) | def initialize(*args, **kw_args, &filter_block)
          method element_matches? (line 19) | def element_matches?(el)
          method element_does_not_match? (line 23) | def element_does_not_match?(el)
          method description (line 27) | def description = "have #{query.description}"
          method query (line 29) | def query
        class HaveAllSelectors (line 34) | class HaveAllSelectors < WrappedElementMatcher
          method element_matches? (line 35) | def element_matches?(el)
          method does_not_match? (line 39) | def does_not_match?(_actual)
          method description (line 43) | def description = 'have all selectors'
        class HaveNoSelectors (line 46) | class HaveNoSelectors < WrappedElementMatcher
          method element_matches? (line 47) | def element_matches?(el)
          method does_not_match? (line 51) | def does_not_match?(_actual)
          method description (line 55) | def description = 'have no selectors'
        class HaveAnySelectors (line 58) | class HaveAnySelectors < WrappedElementMatcher
          method element_matches? (line 59) | def element_matches?(el)
          method does_not_match? (line 63) | def does_not_match?(el)
          method description (line 67) | def description = 'have any selectors'

FILE: lib/capybara/rspec/matchers/have_sibling.rb
  type Capybara (line 5) | module Capybara
    type RSpecMatchers (line 6) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class HaveSibling (line 8) | class HaveSibling < CountableWrappedElementMatcher
          method element_matches? (line 9) | def element_matches?(el)
          method element_does_not_match? (line 13) | def element_does_not_match?(el)
          method description (line 17) | def description
          method query (line 21) | def query

FILE: lib/capybara/rspec/matchers/have_text.rb
  type Capybara (line 5) | module Capybara
    type RSpecMatchers (line 6) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class HaveText (line 8) | class HaveText < CountableWrappedElementMatcher
          method element_matches? (line 9) | def element_matches?(el)
          method element_does_not_match? (line 13) | def element_does_not_match?(el)
          method description (line 17) | def description
          method format (line 21) | def format(content)
          method text (line 27) | def text

FILE: lib/capybara/rspec/matchers/have_title.rb
  type Capybara (line 5) | module Capybara
    type RSpecMatchers (line 6) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class HaveTitle (line 8) | class HaveTitle < WrappedElementMatcher
          method element_matches? (line 9) | def element_matches?(el)
          method element_does_not_match? (line 13) | def element_does_not_match?(el)
          method description (line 17) | def description
          method title (line 23) | def title

FILE: lib/capybara/rspec/matchers/match_selector.rb
  type Capybara (line 5) | module Capybara
    type RSpecMatchers (line 6) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class MatchSelector (line 8) | class MatchSelector < HaveSelector
          method element_matches? (line 9) | def element_matches?(el)
          method element_does_not_match? (line 13) | def element_does_not_match?(el)
          method description (line 17) | def description
          method query (line 21) | def query

FILE: lib/capybara/rspec/matchers/match_style.rb
  type Capybara (line 5) | module Capybara
    type RSpecMatchers (line 6) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class MatchStyle (line 8) | class MatchStyle < WrappedElementMatcher
          method initialize (line 9) | def initialize(styles = nil, **kw_args, &filter_block)
          method element_matches? (line 14) | def element_matches?(el)
          method does_not_match? (line 18) | def does_not_match?(_actual)
          method description (line 22) | def description
        class HaveStyle (line 35) | class HaveStyle < MatchStyle
          method initialize (line 36) | def initialize(*args, **kw_args, &filter_block)
      type Matchers (line 32) | module Matchers
        class MatchStyle (line 8) | class MatchStyle < WrappedElementMatcher
          method initialize (line 9) | def initialize(styles = nil, **kw_args, &filter_block)
          method element_matches? (line 14) | def element_matches?(el)
          method does_not_match? (line 18) | def does_not_match?(_actual)
          method description (line 22) | def description
        class HaveStyle (line 35) | class HaveStyle < MatchStyle
          method initialize (line 36) | def initialize(*args, **kw_args, &filter_block)
    type RSpecMatchers (line 31) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class MatchStyle (line 8) | class MatchStyle < WrappedElementMatcher
          method initialize (line 9) | def initialize(styles = nil, **kw_args, &filter_block)
          method element_matches? (line 14) | def element_matches?(el)
          method does_not_match? (line 18) | def does_not_match?(_actual)
          method description (line 22) | def description
        class HaveStyle (line 35) | class HaveStyle < MatchStyle
          method initialize (line 36) | def initialize(*args, **kw_args, &filter_block)
      type Matchers (line 32) | module Matchers
        class MatchStyle (line 8) | class MatchStyle < WrappedElementMatcher
          method initialize (line 9) | def initialize(styles = nil, **kw_args, &filter_block)
          method element_matches? (line 14) | def element_matches?(el)
          method does_not_match? (line 18) | def does_not_match?(_actual)
          method description (line 22) | def description
        class HaveStyle (line 35) | class HaveStyle < MatchStyle
          method initialize (line 36) | def initialize(*args, **kw_args, &filter_block)
  type Capybara (line 30) | module Capybara
    type RSpecMatchers (line 6) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class MatchStyle (line 8) | class MatchStyle < WrappedElementMatcher
          method initialize (line 9) | def initialize(styles = nil, **kw_args, &filter_block)
          method element_matches? (line 14) | def element_matches?(el)
          method does_not_match? (line 18) | def does_not_match?(_actual)
          method description (line 22) | def description
        class HaveStyle (line 35) | class HaveStyle < MatchStyle
          method initialize (line 36) | def initialize(*args, **kw_args, &filter_block)
      type Matchers (line 32) | module Matchers
        class MatchStyle (line 8) | class MatchStyle < WrappedElementMatcher
          method initialize (line 9) | def initialize(styles = nil, **kw_args, &filter_block)
          method element_matches? (line 14) | def element_matches?(el)
          method does_not_match? (line 18) | def does_not_match?(_actual)
          method description (line 22) | def description
        class HaveStyle (line 35) | class HaveStyle < MatchStyle
          method initialize (line 36) | def initialize(*args, **kw_args, &filter_block)
    type RSpecMatchers (line 31) | module RSpecMatchers
      type Matchers (line 7) | module Matchers
        class MatchStyle (line 8) | class MatchStyle < WrappedElementMatcher
          method initialize (line 9) | def initialize(styles = nil, **kw_args, &filter_block)
          method element_matches? (line 14) | def element_matches?(el)
          method does_not_match? (line 18) | def does_not_match?(_actual)
          method description (line 22) | def description
        class HaveStyle (line 35) | class HaveStyle < MatchStyle
          method initialize (line 36) | def initialize(*args, **kw_args, &filter_block)
      type Matchers (line 32) | module Matchers
        class MatchStyle (line 8) | class MatchStyle < WrappedElementMatcher
          method initialize (line 9) | def initialize(styles = nil, **kw_args, &filter_block)
          method element_matches? (line 14) | def element_matches?(el)
          method does_not_match? (line 18) | def does_not_match?(_actual)
          method description (line 22) | def description
        class HaveStyle (line 35) | class HaveStyle < MatchStyle
          method initialize (line 36) | def initialize(*args, **kw_args, &filter_block)

FILE: lib/capybara/rspec/matchers/spatial_sugar.rb
  type Capybara (line 3) | module Capybara
    type RSpecMatchers (line 4) | module RSpecMatchers
      type SpatialSugar (line 5) | module SpatialSugar
        function above (line 6) | def above(el)
        function below (line 11) | def below(el)
        function left_of (line 16) | def left_of(el)
        function right_of (line 21) | def right_of(el)
        function near (line 26) | def near(el)
        function options (line 33) | def options

FILE: lib/capybara/selector.rb
  class Capybara::Selector (line 426) | class Capybara::Selector; end

FILE: lib/capybara/selector/builders/css_builder.rb
  type Capybara (line 5) | module Capybara
    class Selector (line 6) | class Selector
      class CSSBuilder (line 8) | class CSSBuilder
        method initialize (line 9) | def initialize(expression)
        method add_attribute_conditions (line 15) | def add_attribute_conditions(**attributes)
        method regexp_conditions (line 35) | def regexp_conditions(name, value)
        method attribute_conditions (line 43) | def attribute_conditions(attributes)
        method class_conditions (line 66) | def class_conditions(classes)

FILE: lib/capybara/selector/builders/xpath_builder.rb
  type Capybara (line 5) | module Capybara
    class Selector (line 6) | class Selector
      class XPathBuilder (line 8) | class XPathBuilder
        method initialize (line 9) | def initialize(expression)
        method add_attribute_conditions (line 15) | def add_attribute_conditions(**conditions)
        method attribute_conditions (line 30) | def attribute_conditions(attributes)
        method class_conditions (line 47) | def class_conditions(classes)
        method regexp_to_xpath_conditions (line 62) | def regexp_to_xpath_conditions(regexp)

FILE: lib/capybara/selector/css.rb
  type Capybara (line 5) | module Capybara
    class Selector (line 6) | class Selector
      class CSS (line 7) | class CSS
        method escape (line 8) | def self.escape(str)
        method escape_char (line 17) | def self.escape_char(char)
        method split (line 21) | def self.split(css)
        class Splitter (line 32) | class Splitter
          method split (line 33) | def split(css)
          method parse_square (line 61) | def parse_square(strio)
          method parse_paren (line 65) | def parse_paren(strio)
          method parse_block (line 69) | def parse_block(start, final, strio)
          method parse_string (line 86) | def parse_string(quote, strio)

FILE: lib/capybara/selector/definition.rb
  type Capybara (line 9) | module Capybara
    class Selector (line 10) | class Selector
      class Definition (line 11) | class Definition
        method initialize (line 16) | def initialize(name, locator_type: nil, raw_locator: false, suppor...
        method custom_filters (line 32) | def custom_filters
        method node_filters (line 37) | def node_filters
        method expression_filters (line 41) | def expression_filters
        method xpath (line 59) | def xpath(*allowed_filters, &block)
        method css (line 77) | def css(*allowed_filters, &block)
        method match (line 90) | def match(&block)
        method label (line 104) | def label(label = nil)
        method match? (line 127) | def match?(locator)
        method locator_filter (line 168) | def locator_filter(*types, **options, &block)
        method filter_set (line 174) | def filter_set(name, filters_to_use = nil)
        method describe_expression_filters (line 180) | def describe_expression_filters(&block)
        method describe_all_expression_filters (line 190) | def describe_all_expression_filters(**opts)
        method describe_node_filters (line 200) | def describe_node_filters(&block)
        method visible (line 213) | def visible(default_visibility = nil, &block)
        method default_visibility (line 217) | def default_visibility(fallback = Capybara.ignore_hidden_elements,...
        method raw_locator? (line 227) | def raw_locator?
        method supports_exact? (line 232) | def supports_exact?
        method default_format (line 236) | def default_format
        method locator_types (line 247) | def locator_types
        method handled_custom_options (line 255) | def handled_custom_options(filter, options)
        method parameter_names (line 261) | def parameter_names(block)
        method expression (line 268) | def expression(type, allowed_filters, &block)

FILE: lib/capybara/selector/definition/button.rb
  function combine_locators (line 53) | def combine_locators(locator, config:)
  function labellable_elements (line 65) | def labellable_elements

FILE: lib/capybara/selector/definition/label.rb
  function labelable_elements (line 59) | def labelable_elements

FILE: lib/capybara/selector/definition/select.rb
  function options_text (line 74) | def options_text(node, **opts, &filter_block)

FILE: lib/capybara/selector/definition/table.rb
  function prev_col_position? (line 67) | def prev_col_position?(cell)
  function cell_position (line 71) | def cell_position(cell)
  function match_row (line 75) | def match_row(row, match_size: false)
  function match_row_count (line 87) | def match_row_count(size)
  function row_match_cells_to_headers (line 92) | def row_match_cells_to_headers(row)
  function row_match_ordered_cells (line 101) | def row_match_ordered_cells(row)

FILE: lib/capybara/selector/filter_set.rb
  type Capybara (line 5) | module Capybara
    class Selector (line 6) | class Selector
      class FilterSet (line 7) | class FilterSet
        method initialize (line 10) | def initialize(name, &block)
        method node_filter (line 18) | def node_filter(names, *types, **options, &block)
        method expression_filter (line 25) | def expression_filter(name, *types, **options, &block)
        method describe (line 29) | def describe(what = nil, &block)
        method description (line 42) | def description(node_filters: true, expression_filters: true, **op...
        method descriptions (line 51) | def descriptions
        method import (line 56) | def import(name, filters = nil)
        method all (line 70) | def all
        method [] (line 74) | def [](name)
        method add (line 78) | def add(name, &block)
        method remove (line 82) | def remove(name)
        method undeclared_descriptions (line 89) | def undeclared_descriptions
        method node_filter_descriptions (line 93) | def node_filter_descriptions
        method expression_filter_descriptions (line 97) | def expression_filter_descriptions
        method options_with_defaults (line 103) | def options_with_defaults(options)
        method add_filter (line 110) | def add_filter(name, filter_class, *types, matcher: nil, **options...

FILE: lib/capybara/selector/filters/base.rb
  type Capybara (line 3) | module Capybara
    class Selector (line 4) | class Selector
      type Filters (line 5) | module Filters
        class Base (line 6) | class Base
          method initialize (line 7) | def initialize(name, matcher, block, **options)
          method default? (line 15) | def default?
          method default (line 19) | def default
          method skip? (line 23) | def skip?(value)
          method format (line 27) | def format
          method matcher? (line 31) | def matcher?
          method boolean? (line 35) | def boolean?
          method handles_option? (line 39) | def handles_option?(option_name)
          method apply (line 49) | def apply(subject, name, value, skip_value, ctx)
          method filter_context (line 65) | def filter_context(context)
          method valid_value? (line 69) | def valid_value?(value)

FILE: lib/capybara/selector/filters/expression_filter.rb
  type Capybara (line 5) | module Capybara
    class Selector (line 6) | class Selector
      type Filters (line 7) | module Filters
        class ExpressionFilter (line 8) | class ExpressionFilter < Base
          method apply_filter (line 9) | def apply_filter(expr, name, value, selector)
        class IdentityExpressionFilter (line 14) | class IdentityExpressionFilter < ExpressionFilter
          method initialize (line 15) | def initialize(name); super(name, nil, nil); end
          method default? (line 16) | def default?; false; end
          method matcher? (line 17) | def matcher?; false; end
          method apply_filter (line 18) | def apply_filter(expr, _name, _value, _ctx); expr; end

FILE: lib/capybara/selector/filters/locator_filter.rb
  type Capybara (line 5) | module Capybara
    class Selector (line 6) | class Selector
      type Filters (line 7) | module Filters
        class LocatorFilter (line 8) | class LocatorFilter < NodeFilter
          method initialize (line 9) | def initialize(block, **options)
          method matches? (line 13) | def matches?(node, value, context = nil, exact:)
          method apply (line 21) | def apply(subject, value, skip_value, ctx, **options)

FILE: lib/capybara/selector/filters/node_filter.rb
  type Capybara (line 5) | module Capybara
    class Selector (line 6) | class Selector
      type Filters (line 7) | module Filters
        class NodeFilter (line 8) | class NodeFilter < Base
          method initialize (line 9) | def initialize(name, matcher, block, **options)
          method matches? (line 23) | def matches?(node, name, value, context = nil)

FILE: lib/capybara/selector/regexp_disassembler.rb
  type Capybara (line 5) | module Capybara
    class Selector (line 6) | class Selector
      class RegexpDisassembler (line 8) | class RegexpDisassembler
        method initialize (line 9) | def initialize(regexp)
        method alternated_substrings (line 13) | def alternated_substrings
        method substrings (line 21) | def substrings
        method remove_and_covered (line 30) | def remove_and_covered(strings)
        method remove_or_covered (line 45) | def remove_or_covered(or_series)
        method process (line 61) | def process(alternation:)
        method combine (line 68) | def combine(strs)
        method collapse (line 81) | def collapse(strs)
        method extract_strings (line 87) | def extract_strings(expression, alternation: false)
        class Expression (line 92) | class Expression
          method initialize (line 93) | def initialize(exp)
          method extract_strings (line 97) | def extract_strings(process_alternatives)
          method alternation? (line 113) | def alternation?
          method optional? (line 117) | def optional?
          method terminal? (line 121) | def terminal?
          method strings (line 125) | def strings(process_alternatives)
          method terminal_strings (line 137) | def terminal_strings
          method optional_strings (line 148) | def optional_strings
          method repeated_strings (line 152) | def repeated_strings(process_alternatives)
          method alternative_strings (line 156) | def alternative_strings
          method ignore? (line 161) | def ignore?
          method indeterminate? (line 168) | def indeterminate?
          method min_repeat (line 172) | def min_repeat
          method max_repeat (line 176) | def max_repeat
          method fixed_repeat? (line 180) | def fixed_repeat?
          method type (line 184) | def type
          method repeat_set (line 188) | def repeat_set(str)
          method options_set (line 194) | def options_set(strs)
          method alternatives (line 200) | def alternatives
          method each (line 204) | def each

FILE: lib/capybara/selector/selector.rb
  type Capybara (line 3) | module Capybara
    class Selector (line 4) | class Selector < SimpleDelegator
      method all (line 6) | def all
      method [] (line 10) | def [](name)
      method add (line 14) | def add(name, **options, &block)
      method update (line 18) | def update(name, &block)
      method remove (line 22) | def remove(name)
      method for (line 26) | def for(locator)
      method initialize (line 33) | def initialize(definition, config:, format:)
      method format (line 42) | def format
      method enable_aria_label (line 47) | def enable_aria_label
      method enable_aria_role (line 51) | def enable_aria_role
      method test_id (line 55) | def test_id
      method call (line 59) | def call(locator, **options)
      method add_error (line 77) | def add_error(error_msg)
      method expression_for (line 81) | def expression_for(name, locator, config: @config, format: current_f...
      method with_filter_errors (line 86) | def with_filter_errors(errors)
      method builder (line 95) | def builder(expr = nil)
      method locator_description (line 108) | def locator_description
      method locator_valid? (line 118) | def locator_valid?(locator)
      method locate_field (line 126) | def locate_field(xpath, locator, **_options)
      method locate_label (line 142) | def locate_label(locator)
      method find_by_attr (line 146) | def find_by_attr(attribute, value)
      method find_by_class_attr (line 155) | def find_by_class_attr(classes)

FILE: lib/capybara/selector/xpath_extensions.rb
  type XPath (line 3) | module XPath
    class Renderer (line 4) | class Renderer
      method join (line 5) | def join(*expressions)
    type DSL (line 12) | module DSL
      function join (line 13) | def join(*expressions)
  type XPath (line 11) | module XPath
    class Renderer (line 4) | class Renderer
      method join (line 5) | def join(*expressions)
    type DSL (line 12) | module DSL
      function join (line 13) | def join(*expressions)

FILE: lib/capybara/selenium/atoms/src/getAttribute.js
  function isSelectable (line 56) | function isSelectable(element){
  function isSelected (line 71) | function isSelected(element){
  function getAttributeValue (line 81) | function getAttributeValue(element, name){

FILE: lib/capybara/selenium/atoms/src/isDisplayed.js
  function isShown_ (line 8) | function isShown_(elem, ignoreOpacity, parentsDisplayedFn) {
  function getClientRegion (line 100) | function getClientRegion(elem) {
  function getParentElement (line 108) | function getParentElement(node) {
  function getOverflowState (line 112) | function getOverflowState(elem) {
  function getViewportSize (line 261) | function getViewportSize(win) {
  function rect_ (line 266) | function rect_(x, y, w, h){
  function getClientRect (line 270) | function getClientRect(elem) {
  function getOpacity (line 293) | function getOpacity(elem) {
  function getAreaRelativeRect_ (line 310) | function getAreaRelativeRect_(area) {
  function maybeFindImageMap_ (line 332) | function maybeFindImageMap_(elem) {
  function getAncestor (line 368) | function getAncestor(element, matcher) {
  function isElement (line 383) | function isElement(node, opt_tagName) {
  function getParentNodeInComposedDom (line 392) | function getParentNodeInComposedDom(node) {
  function displayed (line 419) | function displayed(e) {

FILE: lib/capybara/selenium/driver.rb
  class Capybara::Selenium::Driver (line 6) | class Capybara::Selenium::Driver < Capybara::Driver::Base
    method load_selenium (line 22) | def load_selenium
    method register_specialization (line 57) | def register_specialization(browser_name, specialization)
    method browser (line 63) | def browser
    method initialize (line 83) | def initialize(app, **options)
    method visit (line 94) | def visit(path)
    method refresh (line 98) | def refresh
    method go_back (line 102) | def go_back
    method go_forward (line 106) | def go_forward
    method html (line 110) | def html
    method title (line 116) | def title
    method current_url (line 120) | def current_url
    method wait? (line 124) | def wait?; true; end
    method needs_server? (line 125) | def needs_server?; true; end
    method execute_script (line 127) | def execute_script(script, *args)
    method evaluate_script (line 131) | def evaluate_script(script, *args)
    method evaluate_async_script (line 136) | def evaluate_async_script(script, *args)
    method active_element (line 142) | def active_element
    method send_keys (line 146) | def send_keys(*args)
    method save_screenshot (line 151) | def save_screenshot(path, **options)
    method reset! (line 155) | def reset!
    method frame_obscured_at? (line 178) | def frame_obscured_at?(x:, y:)
    method switch_to_frame (line 190) | def switch_to_frame(frame)
    method current_window_handle (line 205) | def current_window_handle
    method window_size (line 209) | def window_size(handle)
    method resize_window_to (line 216) | def resize_window_to(handle, width, height)
    method maximize_window (line 222) | def maximize_window(handle)
    method fullscreen_window (line 229) | def fullscreen_window(handle)
    method close_window (line 235) | def close_window(handle)
    method window_handles (line 243) | def window_handles
    method open_new_window (line 247) | def open_new_window(kind = :tab)
    method switch_to_window (line 260) | def switch_to_window(handle)
    method accept_modal (line 264) | def accept_modal(_type, **options)
    method dismiss_modal (line 275) | def dismiss_modal(_type, **options)
    method quit (line 283) | def quit
    method invalid_element_errors (line 297) | def invalid_element_errors
    method no_such_window_error (line 313) | def no_such_window_error
    method native_args (line 319) | def native_args(args)
    method native_active_element (line 323) | def native_active_element
    method clear_browser_state (line 327) | def clear_browser_state
    method clear_browser_state_errors (line 336) | def clear_browser_state_errors
    method unhandled_alert_errors (line 340) | def unhandled_alert_errors
    method delete_all_cookies (line 344) | def delete_all_cookies
    method clear_storage (line 348) | def clear_storage
    method clear_session_storage (line 355) | def clear_session_storage
    method clear_local_storage (line 369) | def clear_local_storage
    method navigate_with_accept (line 385) | def navigate_with_accept(url)
    method modal_error (line 393) | def modal_error
    method within_given_window (line 397) | def within_given_window(handle)
    method find_modal (line 409) | def find_modal(text: nil, **options)
    method find_modal_errors (line 432) | def find_modal_errors
    method silenced_unknown_error_message? (line 436) | def silenced_unknown_error_message?(msg)
    method silenced_unknown_error_messages (line 440) | def silenced_unknown_error_messages
    method unwrap_script_result (line 444) | def unwrap_script_result(arg)
    method find_context (line 457) | def find_context
    method build_node (line 461) | def build_node(native_node, initial_cache = {})
    method bridge (line 465) | def bridge
    method specialize_driver (line 469) | def specialize_driver
    method setup_exit_handler (line 476) | def setup_exit_handler
    method reset_browser_state (line 486) | def reset_browser_state
    method wait_for_empty_page (line 491) | def wait_for_empty_page(timer)
    method accept_unhandled_reset_alert (line 504) | def accept_unhandled_reset_alert

FILE: lib/capybara/selenium/driver_specializations/chrome_driver.rb
  type Capybara::Selenium::Driver::ChromeDriver (line 6) | module Capybara::Selenium::Driver::ChromeDriver
    function extended (line 7) | def self.extended(base)
    function fullscreen_window (line 14) | def fullscreen_window(handle)
    function resize_window_to (line 25) | def resize_window_to(handle, width, height)
    function reset! (line 36) | def reset!
    function storage_types_to_clear (line 59) | def storage_types_to_clear
    function clear_all_storage? (line 65) | def clear_all_storage?
    function uniform_storage_clear? (line 69) | def uniform_storage_clear?
    function storage_clears (line 73) | def storage_clears
    function clear_storage (line 77) | def clear_storage
    function delete_all_cookies (line 84) | def delete_all_cookies
    function cdp_unsupported_errors (line 91) | def cdp_unsupported_errors
    function execute_cdp (line 95) | def execute_cdp(cmd, params = {})
    function build_node (line 105) | def build_node(native_node, initial_cache = {})
    function chromedriver_version (line 109) | def chromedriver_version

FILE: lib/capybara/selenium/driver_specializations/edge_driver.rb
  type Capybara::Selenium::Driver::EdgeDriver (line 5) | module Capybara::Selenium::Driver::EdgeDriver
    function extended (line 6) | def self.extended(base)
    function fullscreen_window (line 12) | def fullscreen_window(handle)
    function resize_window_to (line 25) | def resize_window_to(handle, width, height)
    function reset! (line 36) | def reset!
    function download_path= (line 57) | def download_path=(path)
    function storage_types_to_clear (line 68) | def storage_types_to_clear
    function clear_all_storage? (line 74) | def clear_all_storage?
    function uniform_storage_clear? (line 78) | def uniform_storage_clear?
    function storage_clears (line 82) | def storage_clears
    function clear_storage (line 86) | def clear_storage
    function delete_all_cookies (line 92) | def delete_all_cookies
    function cdp_unsupported_errors (line 101) | def cdp_unsupported_errors
    function execute_cdp (line 105) | def execute_cdp(cmd, params = {})
    function build_node (line 115) | def build_node(native_node, initial_cache = {})
    function edgedriver_version (line 119) | def edgedriver_version

FILE: lib/capybara/selenium/driver_specializations/firefox_driver.rb
  type Capybara::Selenium::Driver::FirefoxDriver (line 5) | module Capybara::Selenium::Driver::FirefoxDriver
    function extended (line 6) | def self.extended(driver)
  type Capybara::Selenium::Driver::W3CFirefoxDriver (line 13) | module Capybara::Selenium::Driver::W3CFirefoxDriver
    function extended (line 15) | def extended(driver)
    function pause_broken? (line 20) | def pause_broken?(sel_driver)
    function resize_window_to (line 25) | def resize_window_to(handle, width, height)
    function reset! (line 36) | def reset!
    function refresh (line 54) | def refresh
    function switch_to_frame (line 63) | def switch_to_frame(frame)
    function build_node (line 75) | def build_node(native_node, initial_cache = {})
    function browser_version (line 79) | def browser_version

FILE: lib/capybara/selenium/driver_specializations/internet_explorer_driver.rb
  type Capybara::Selenium::Driver::InternetExplorerDriver (line 5) | module Capybara::Selenium::Driver::InternetExplorerDriver
    function switch_to_frame (line 6) | def switch_to_frame(frame)
    function build_node (line 18) | def build_node(native_node, initial_cache = {})
  type Capybara::Selenium (line 23) | module Capybara::Selenium

FILE: lib/capybara/selenium/driver_specializations/safari_driver.rb
  type Capybara::Selenium::Driver::SafariDriver (line 5) | module Capybara::Selenium::Driver::SafariDriver
    function switch_to_frame (line 6) | def switch_to_frame(frame)
    function build_node (line 18) | def build_node(native_node, initial_cache = {})

FILE: lib/capybara/selenium/extensions/file_input_click_emulation.rb
  class Capybara::Selenium::Node (line 3) | class Capybara::Selenium::Node
    type FileInputClickEmulation (line 4) | module FileInputClickEmulation
      function click (line 5) | def click(keys = [], **options)
      function visible_file_field? (line 15) | def visible_file_field?
      function attaching_file? (line 19) | def attaching_file?
      function emulate_click (line 23) | def emulate_click

FILE: lib/capybara/selenium/extensions/find.rb
  type Capybara (line 3) | module Capybara
    type Selenium (line 4) | module Selenium
      type Find (line 5) | module Find
        function find_xpath (line 6) | def find_xpath(selector, uses_visibility: false, styles: nil, posi...
        function find_css (line 10) | def find_css(selector, uses_visibility: false, texts: [], styles: ...
        function find_by (line 16) | def find_by(format, selector, uses_visibility:, texts:, styles:, p...
        function gather_hints (line 32) | def gather_hints(elements, uses_visibility:, styles:, position:)
        function filter_by_text (line 49) | def filter_by_text(elements, texts)
        function build_hints_js (line 59) | def build_hints_js(uses_visibility, styles, position)
        function es_context (line 101) | def es_context
        function is_displayed_atom (line 105) | def is_displayed_atom # rubocop:disable Naming/PredicatePrefix

FILE: lib/capybara/selenium/extensions/html5_drag.rb
  class Capybara::Selenium::Node (line 3) | class Capybara::Selenium::Node
    type Html5Drag (line 4) | module Html5Drag
      function drag_to (line 7) | def drag_to(element, html5: nil, delay: 0.05, drop_modifiers: [])
      function perform_legacy_drag (line 22) | def perform_legacy_drag(element, drop_modifiers)
      function perform_html5_drag (line 31) | def perform_html5_drag(element, delay, drop_modifiers)
      function html5_drop (line 36) | def html5_drop(*args)

FILE: lib/capybara/selenium/extensions/modifier_keys_stack.rb
  class Capybara::Selenium::Node (line 3) | class Capybara::Selenium::Node
    class ModifierKeysStack (line 7) | class ModifierKeysStack
      method initialize (line 8) | def initialize
      method include? (line 12) | def include?(key)
      method press (line 16) | def press(key)
      method push (line 20) | def push
      method pop (line 24) | def pop

FILE: lib/capybara/selenium/extensions/scroll.rb
  type Capybara (line 3) | module Capybara
    type Selenium (line 4) | module Selenium
      type Scroll (line 5) | module Scroll
        function scroll_by (line 6) | def scroll_by(x, y)
        function scroll_to (line 18) | def scroll_to(element, location, position = nil)
        function scroll_element_to_location (line 32) | def scroll_element_to_location(element, location)
        function scroll_to_location (line 54) | def scroll_to_location(location)
        function scroll_to_coords (line 64) | def scroll_to_coords(x, y)

FILE: lib/capybara/selenium/node.rb
  class Capybara::Selenium::Node (line 9) | class Capybara::Selenium::Node < Capybara::Driver::Node
    method visible_text (line 14) | def visible_text
    method all_text (line 20) | def all_text
    method [] (line 25) | def [](name)
    method value (line 31) | def value
    method style (line 39) | def style(styles)
    method set (line 59) | def set(value, **options)
    method select_option (line 96) | def select_option
    method unselect_option (line 100) | def unselect_option
    method click (line 106) | def click(keys = [], **options)
    method right_click (line 129) | def right_click(keys = [], **options)
    method double_click (line 144) | def double_click(keys = [], **options)
    method send_keys (line 153) | def send_keys(*args)
    method hover (line 157) | def hover
    method drag_to (line 161) | def drag_to(element, drop_modifiers: [], **)
    method drop (line 174) | def drop(*_)
    method tag_name (line 178) | def tag_name
    method visible? (line 187) | def visible?; boolean_attr(native.displayed?); end
    method readonly? (line 188) | def readonly?; boolean_attr(self[:readonly]); end
    method multiple? (line 189) | def multiple?; boolean_attr(self[:multiple]); end
    method selected? (line 190) | def selected?; boolean_attr(native.selected?); end
    method disabled? (line 193) | def disabled?
    method content_editable? (line 200) | def content_editable?
    method path (line 204) | def path
    method obscured? (line 208) | def obscured?(x: nil, y: nil)
    method rect (line 215) | def rect
    method shadow_root (line 219) | def shadow_root
    method scroll_if_needed (line 226) | def scroll_if_needed
    method scroll_to_center (line 233) | def scroll_to_center
    method sibling_index (line 250) | def sibling_index(parent, node, selector)
    method boolean_attr (line 264) | def boolean_attr(val)
    method select_node (line 269) | def select_node
    method set_text (line 273) | def set_text(value, clear: nil, rapid: nil, **_unused)
    method auto_rapid_set_length (line 295) | def auto_rapid_set_length
    method perform_with_options (line 299) | def perform_with_options(click_options, &block)
    method set_date (line 313) | def set_date(value) # rubocop:disable Naming/AccessorMethodName
    method set_time (line 321) | def set_time(value) # rubocop:disable Naming/AccessorMethodName
    method set_datetime_local (line 329) | def set_datetime_local(value) # rubocop:disable Naming/AccessorMethodName
    method set_color (line 337) | def set_color(value) # rubocop:disable Naming/AccessorMethodName
    method set_range (line 341) | def set_range(value) # rubocop:disable Naming/AccessorMethodName
    method update_value_js (line 345) | def update_value_js(value)
    method set_file (line 359) | def set_file(value) # rubocop:disable Naming/AccessorMethodName
    method with_file_detector (line 369) | def with_file_detector
    method set_content_editable (line 387) | def set_content_editable(value) # rubocop:disable Naming/AccessorMetho...
    method action_with_modifiers (line 411) | def action_with_modifiers(click_options)
    method modifiers_down (line 438) | def modifiers_down(actions, keys)
    method modifiers_up (line 443) | def modifiers_up(actions, keys)
    method browser (line 448) | def browser
    method bridge (line 452) | def bridge
    method browser_action (line 456) | def browser_action
    method capabilities (line 460) | def capabilities
    method action_pause (line 464) | def action_pause(action, duration)
    method normalize_keys (line 468) | def normalize_keys(keys)
    method each_key (line 479) | def each_key(keys, &block)
    method find_context (line 483) | def find_context
    method build_node (line 487) | def build_node(native_node, initial_cache = {})
    method attrs (line 491) | def attrs(*attr_names)
    method native_id (line 503) | def native_id
    method shadow_root? (line 509) | def shadow_root?
    class SettableValue (line 573) | class SettableValue
      method initialize (line 576) | def initialize(value)
      method to_s (line 580) | def to_s
      method dateable? (line 584) | def dateable?
      method to_date_str (line 588) | def to_date_str
      method timeable? (line 592) | def timeable?
      method to_time_str (line 596) | def to_time_str
      method to_datetime_str (line 600) | def to_datetime_str
    class ClickOptions (line 607) | class ClickOptions
      method initialize (line 610) | def initialize(keys, options)
      method coords? (line 615) | def coords?
      method coords (line 619) | def coords
      method center_offset? (line 623) | def center_offset?
      method empty? (line 627) | def empty?
      method delay (line 631) | def delay

FILE: lib/capybara/selenium/nodes/chrome_node.rb
  class Capybara::Selenium::ChromeNode (line 6) | class Capybara::Selenium::ChromeNode < Capybara::Selenium::Node
    method set_text (line 10) | def set_text(value, clear: nil, **_unused)
    method set_file (line 17) | def set_file(value) # rubocop:disable Naming/AccessorMethodName
    method drop (line 29) | def drop(*args)
    method click (line 33) | def click(*, **)
    method disabled? (line 46) | def disabled?
    method select_option (line 50) | def select_option
    method visible? (line 58) | def visible?
    method send_keys (line 70) | def send_keys(*args)
    method catch_error? (line 90) | def catch_error?(error, errors = nil)
    method perform_legacy_drag (line 100) | def perform_legacy_drag(element, drop_modifiers)
    method browser_version (line 111) | def browser_version(to_float: true)
    method chromedriver_fixed_actions_key_state? (line 118) | def chromedriver_fixed_actions_key_state?
    method chromedriver_supports_displayed_endpoint? (line 122) | def chromedriver_supports_displayed_endpoint?
    method chromedriver_version (line 126) | def chromedriver_version
    method native_displayed? (line 130) | def native_displayed?

FILE: lib/capybara/selenium/nodes/edge_node.rb
  class Capybara::Selenium::EdgeNode (line 5) | class Capybara::Selenium::EdgeNode < Capybara::Selenium::Node
    method set_text (line 8) | def set_text(value, clear: nil, **_unused)
    method set_file (line 17) | def set_file(value) # rubocop:disable Naming/AccessorMethodName
    method drop (line 29) | def drop(*args)
    method click (line 35) | def click(*, **)
    method disabled? (line 46) | def disabled?
    method select_option (line 52) | def select_option
    method visible? (line 62) | def visible?
    method send_keys (line 74) | def send_keys(*args)
    method browser_version (line 94) | def browser_version
    method chrome_edge? (line 101) | def chrome_edge?
    method native_displayed? (line 105) | def native_displayed?

FILE: lib/capybara/selenium/nodes/firefox_node.rb
  class Capybara::Selenium::FirefoxNode (line 6) | class Capybara::Selenium::FirefoxNode < Capybara::Selenium::Node
    method click (line 10) | def click(keys = [], **options)
    method disabled? (line 22) | def disabled?
    method set_file (line 26) | def set_file(value) # rubocop:disable Naming/AccessorMethodName
    method focused? (line 43) | def focused?
    method send_keys (line 47) | def send_keys(*args)
    method drop (line 56) | def drop(*args)
    method hover (line 60) | def hover
    method select_option (line 67) | def select_option
    method visible? (line 75) | def visible?
    method native_displayed? (line 89) | def native_displayed?
    method perform_with_options (line 93) | def perform_with_options(click_options)
    method _send_keys (line 100) | def _send_keys(keys, actions = browser_action, down_keys = ModifierKey...
    method upload (line 125) | def upload(local_file)
    method browser_version (line 133) | def browser_version

FILE: lib/capybara/selenium/nodes/ie_node.rb
  class Capybara::Selenium::IENode (line 5) | class Capybara::Selenium::IENode < Capybara::Selenium::Node
    method disabled? (line 6) | def disabled?

FILE: lib/capybara/selenium/nodes/safari_node.rb
  class Capybara::Selenium::SafariNode (line 6) | class Capybara::Selenium::SafariNode < Capybara::Selenium::Node
    method click (line 9) | def click(keys = [], **options)
    method select_option (line 28) | def select_option
    method unselect_option (line 37) | def unselect_option
    method visible_text (line 42) | def visible_text
    method disabled? (line 53) | def disabled?
    method set_file (line 57) | def set_file(value) # rubocop:disable Naming/AccessorMethodName
    method send_keys (line 63) | def send_keys(*args)
    method set_text (line 72) | def set_text(value, clear: nil, **_unused)
    method hover (line 86) | def hover
    method _send_keys (line 93) | def _send_keys(keys, actions = browser_action, down_keys = ModifierKey...

FILE: lib/capybara/selenium/patches/atoms.rb
  type CapybaraAtoms (line 3) | module CapybaraAtoms
    function read_atom (line 6) | def read_atom(function)

FILE: lib/capybara/selenium/patches/is_displayed.rb
  type Capybara (line 3) | module Capybara
    type Selenium (line 4) | module Selenium
      type IsDisplayed (line 5) | module IsDisplayed
        function commands (line 6) | def commands(command)

FILE: lib/capybara/selenium/patches/logs.rb
  type Capybara (line 3) | module Capybara
    type Selenium (line 4) | module Selenium
      type ChromeLogs (line 5) | module ChromeLogs
        function commands (line 17) | def commands(command)
        function available_log_types (line 21) | def available_log_types
        function log (line 28) | def log(type)

FILE: lib/capybara/selenium/patches/pause_duration_fix.rb
  type PauseDurationFix (line 3) | module PauseDurationFix
    function encode (line 4) | def encode

FILE: lib/capybara/selenium/patches/persistent_client.rb
  type Capybara (line 3) | module Capybara
    type Selenium (line 4) | module Selenium
      class PersistentClient (line 5) | class PersistentClient < ::Selenium::WebDriver::Remote::Http::Default
        method close (line 6) | def close
        method http (line 13) | def http

FILE: lib/capybara/server.rb
  type Capybara (line 10) | module Capybara
    class Server (line 12) | class Server
      method ports (line 14) | def ports
      method initialize (line 21) | def initialize(app,
      method reset_error! (line 41) | def reset_error!
      method error (line 45) | def error
      method using_ssl? (line 49) | def using_ssl?
      method responsive? (line 53) | def responsive?
      method wait_for_pending_requests (line 63) | def wait_for_pending_requests
      method boot (line 72) | def boot
      method base_url (line 91) | def base_url
      method middleware (line 97) | def middleware
      method port_key (line 101) | def port_key
      method pending_requests? (line 105) | def pending_requests?
      method find_available_port (line 109) | def find_available_port(host)

FILE: lib/capybara/server/animation_disabler.rb
  type Capybara (line 3) | module Capybara
    class Server (line 4) | class Server
      class AnimationDisabler (line 5) | class AnimationDisabler
        method selector_for (line 6) | def self.selector_for(css_or_bool)
        method initialize (line 17) | def initialize(app)
        method call (line 24) | def call(env)
        method html_content? (line 41) | def html_content?(headers)
        method insert_disable (line 45) | def insert_disable(html, nonces)
        method directive_nonces (line 50) | def directive_nonces(headers)

FILE: lib/capybara/server/checker.rb
  type Capybara (line 3) | module Capybara
    class Server (line 4) | class Server
      class Checker (line 5) | class Checker
        method initialize (line 8) | def initialize(host, port)
        method request (line 13) | def request(&block)
        method ssl? (line 21) | def ssl?
        method http_request (line 27) | def http_request(&block)
        method https_request (line 31) | def https_request(&block)
        method make_request (line 35) | def make_request(**options, &block)
        method ssl_options (line 39) | def ssl_options

FILE: lib/capybara/server/middleware.rb
  type Capybara (line 3) | module Capybara
    class Server (line 4) | class Server
      class Middleware (line 5) | class Middleware
        class Counter (line 6) | class Counter
          method initialize (line 7) | def initialize
          method increment (line 12) | def increment(uri)
          method decrement (line 16) | def decrement(uri)
          method positive? (line 20) | def positive?
          method value (line 24) | def value
        method initialize (line 31) | def initialize(app, server_errors, extra_middleware = [])
        method pending_requests (line 40) | def pending_requests
        method pending_requests? (line 44) | def pending_requests?
        method clear_error (line 48) | def clear_error
        method call (line 52) | def call(env)

FILE: lib/capybara/session.rb
  type Capybara (line 6) | module Capybara
    class Session (line 38) | class Session
      method initialize (line 79) | def initialize(mode, app = nil)
      method driver (line 100) | def driver
      method reset! (line 130) | def reset!
      method quit (line 147) | def quit
      method raise_server_error! (line 158) | def raise_server_error!
      method response_headers (line 179) | def response_headers
      method status_code (line 189) | def status_code
      method html (line 197) | def html
      method current_path (line 207) | def current_path
      method current_host (line 222) | def current_host
      method current_url (line 231) | def current_url
      method visit (line 261) | def visit(visit_uri)
      method refresh (line 288) | def refresh
      method go_back (line 297) | def go_back
      method go_forward (line 305) | def go_forward
      method send_keys (line 313) | def send_keys(...)
      method active_element (line 323) | def active_element
      method within (line 362) | def within(*args, **kw_args)
      method within_fieldset (line 379) | def within_fieldset(locator, &block)
      method within_table (line 389) | def within_table(locator, &block)
      method switch_to_frame (line 408) | def switch_to_frame(frame)
      method within_frame (line 448) | def within_frame(*args, **kw_args)
      method current_window (line 460) | def current_window
      method windows (line 471) | def windows
      method open_new_window (line 484) | def open_new_window(kind = :tab)
      method switch_to_window (line 512) | def switch_to_window(window = nil, **options, &window_locator)
      method within_window (line 545) | def within_window(window_or_proc)
      method window_opened_by (line 581) | def window_opened_by(**options)
      method execute_script (line 604) | def execute_script(script, *args)
      method evaluate_script (line 619) | def evaluate_script(script, *args)
      method evaluate_async_script (line 633) | def evaluate_async_script(script, *args)
      method accept_alert (line 659) | def accept_alert(text = nil, **options, &blk)
      method accept_confirm (line 669) | def accept_confirm(text = nil, **options, &blk)
      method dismiss_confirm (line 679) | def dismiss_confirm(text = nil, **options, &blk)
      method accept_prompt (line 690) | def accept_prompt(text = nil, **options, &blk)
      method dismiss_prompt (line 700) | def dismiss_prompt(text = nil, **options, &blk)
      method save_page (line 716) | def save_page(path = nil)
      method save_and_open_page (line 732) | def save_and_open_page(path = nil)
      method save_screenshot (line 747) | def save_screenshot(path = nil, **options)
      method save_and_open_screenshot (line 762) | def save_and_open_screenshot(path = nil, **options)
      method document (line 766) | def document
      method inspect (line 787) | def inspect
      method current_scope (line 791) | def current_scope
      method using_wait_time (line 800) | def using_wait_time(seconds, &block)
      method configure (line 819) | def configure
      method instance_created? (line 825) | def self.instance_created?
      method config (line 829) | def config
      method server_url (line 837) | def server_url
      method driver_args (line 845) | def driver_args(args)
      method accept_modal (line 849) | def accept_modal(type, text_or_options, options, &blk)
      method dismiss_modal (line 853) | def dismiss_modal(type, text_or_options, options, &blk)
      method modal_options (line 857) | def modal_options(text = nil, **options)
      method open_file (line 863) | def open_file(path)
      method prepare_path (line 870) | def prepare_path(path, extension)
      method default_fn (line 876) | def default_fn(extension)
      method scopes (line 881) | def scopes
      method element_script_result (line 885) | def element_script_result(arg)
      method adjust_server_port (line 898) | def adjust_server_port(uri)
      method _find_frame (line 902) | def _find_frame(*args, **kw_args)
      method _switch_to_window (line 918) | def _switch_to_window(window = nil, **options, &window_locator)
      method _switch_to_window_by_locator (line 938) | def _switch_to_window_by_locator
      method synchronize_windows (line 946) | def synchronize_windows(options, &block)

FILE: lib/capybara/session/config.rb
  type Capybara (line 5) | module Capybara
    class SessionConfig (line 6) | class SessionConfig
      method server_host (line 75) | def server_host
      method server_errors= (line 80) | def server_errors=(errors)
      method app_host= (line 85) | def app_host=(url)
      method default_host= (line 94) | def default_host=(url)
      method test_id= (line 111) | def test_id=(id)
      method initialize_copy (line 115) | def initialize_copy(other)
    class ReadOnlySessionConfig (line 121) | class ReadOnlySessionConfig < SimpleDelegator

FILE: lib/capybara/session/matchers.rb
  type Capybara (line 3) | module Capybara
    type SessionMatchers (line 4) | module SessionMatchers
      function assert_current_path (line 22) | def assert_current_path(path, **options, &optional_filter_block)
      function assert_no_current_path (line 38) | def assert_no_current_path(path, **options, &optional_filter_block)
      function has_current_path? (line 53) | def has_current_path?(path, **options, &optional_filter_block)
      function has_no_current_path? (line 66) | def has_no_current_path?(path, **options, &optional_filter_block)
      function _verify_current_path (line 72) | def _verify_current_path(path, filter_block, **options)
      function make_predicate (line 80) | def make_predicate(options)

FILE: lib/capybara/spec/public/jquery-ui.js
  function t (line 6) | function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n...
  function i (line 6) | function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack(...
  function s (line 6) | function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("positi...
  function n (line 6) | function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[...
  function a (line 6) | function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, ....
  function o (line 6) | function o(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent(...
  function r (line 6) | function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);ret...
  function h (line 6) | function h(e){return function(){var t=this.element.val();e.apply(this,ar...
  function s (line 6) | function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"pa...
  function r (line 6) | function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-st...
  function i (line 6) | function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}
  function t (line 6) | function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFl...
  function i (line 6) | function i(t,i){return parseInt(e.css(t,i),10)||0}
  function s (line 6) | function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t...
  function i (line 9) | function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t...
  function t (line 10) | function t(e){return{position:e.position,offset:e.offset}}
  function t (line 10) | function t(e){return{originalPosition:e.originalPosition,originalSize:e....
  function e (line 10) | function e(e,t,i){return e>=t&&t+i>e}
  function i (line 10) | function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.de...
  function s (line 10) | function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,functi...
  function n (line 10) | function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(...
  function t (line 10) | function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defa...
  function i (line 10) | function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.st...
  function t (line 10) | function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effec...
  function i (line 10) | function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=...
  function i (line 10) | function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)...
  function s (line 10) | function s(){b.push(this),b.length===d*c&&n()}
  function n (line 10) | function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}
  function i (line 12) | function i(){r.push(this)}
  function i (line 12) | function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}
  function i (line 12) | function i(){var e=this.element[0]===this.document[0].activeElement;e||(...
  function s (line 12) | function s(){return t>n&&(t=0),0>t&&(t=n),t}
  function s (line 13) | function s(){a.running=!1,a._trigger("activate",t,i)}
  function n (line 13) | function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-ac...
  function n (line 13) | function n(e){l.of=e,o.is(":hidden")||o.position(l)}

FILE: lib/capybara/spec/public/jquery.js
  function s (line 2) | function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"funct...
  function fa (line 2) | function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.node...
  function ga (line 2) | function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLengt...
  function ha (line 2) | function ha(a){return a[u]=!0,a}
  function ia (line 2) | function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){re...
  function ja (line 2) | function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[...
  function ka (line 2) | function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sou...
  function la (line 2) | function la(a){return function(b){var c=b.nodeName.toLowerCase();return"...
  function ma (line 2) | function ma(a){return function(b){var c=b.nodeName.toLowerCase();return(...
  function na (line 2) | function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,...
  function oa (line 2) | function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}
  function pa (line 2) | function pa(){}
  function qa (line 2) | function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}
  function ra (line 2) | function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.firs...
  function sa (line 2) | function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e-...
  function ta (line 2) | function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}
  function ua (line 2) | function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(...
  function va (line 2) | function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)...
  function wa (line 2) | function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.r...
  function xa (line 2) | function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var...
  function z (line 2) | function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){retur...
  function F (line 2) | function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}
  function H (line 2) | function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!...
  function J (line 2) | function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded...
  function K (line 2) | function K(){(d.addEventListener||"load"===a.event.type||"complete"===d....
  function P (line 2) | function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace...
  function Q (line 3) | function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&...
  function R (line 3) | function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cach...
  function S (line 3) | function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.ex...
  function X (line 3) | function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:functi...
  function ca (line 3) | function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.cre...
  function ea (line 3) | function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagNam...
  function fa (line 3) | function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval"...
  function ia (line 3) | function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}
  function ja (line 3) | function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0...
  function pa (line 3) | function pa(){return!0}
  function qa (line 3) | function qa(){return!1}
  function ra (line 3) | function ra(){try{return d.activeElement}catch(a){}}
  function sa (line 3) | function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof...
  function Ca (line 3) | function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeTyp...
  function Da (line 3) | function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}
  function Ea (line 3) | function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttrib...
  function Fa (line 3) | function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a)...
  function Ga (line 3) | function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCas...
  function Ha (line 3) | function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-...
  function Ia (line 3) | function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)...
  function La (line 3) | function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[...
  function Ma (line 3) | function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(...
  function k (line 3) | function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssTex...
  function Ua (line 3) | function Ua(a,b){return{get:function(){return a()?void delete this.get:(...
  function bb (line 3) | function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.sli...
  function cb (line 3) | function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.styl...
  function db (line 3) | function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[...
  function eb (line 3) | function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===...
  function fb (line 3) | function fb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f...
  function gb (line 4) | function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}
  function lb (line 4) | function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}
  function mb (line 4) | function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d[...
  function nb (line 4) | function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["...
  function ob (line 4) | function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeTyp...
  function pb (line 4) | function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a...
  function qb (line 4) | function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().alw...
  function Cb (line 4) | function Cb(a){return n.attr(a,"class")||""}
  function Tb (line 4) | function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var ...
  function Ub (line 4) | function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!...
  function Vb (line 4) | function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)voi...
  function Wb (line 4) | function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[...
  function Xb (line 4) | function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])fo...
  function y (line 4) | function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j...
  function Yb (line 4) | function Yb(a){return a.style&&a.style.display||n.css(a,"display")}
  function Zb (line 4) | function Zb(a){if(!n.contains(a.ownerDocument||d,a))return!0;while(a&&1=...
  function dc (line 4) | function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b....
  function hc (line 4) | function hc(){try{return new a.XMLHttpRequest}catch(b){}}
  function ic (line 4) | function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(...
  function mc (line 4) | function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.pa...

FILE: lib/capybara/spec/session/current_url_spec.rb
  function bases (line 13) | def bases
  function should_be_on (line 17) | def should_be_on(server_index, path = '/host', scheme = 'http')
  function visit_host_links (line 30) | def visit_host_links

FILE: lib/capybara/spec/session/has_text_spec.rb
  function to_s (line 117) | def to_s; '42' end
  function to_hash (line 118) | def to_hash; { value: 'Other hash' } end
  function to_s (line 126) | def to_s; '42' end
  function to_hash (line 127) | def to_hash; { value: 'Other hash' } end

FILE: lib/capybara/spec/session/node_wrapper_spec.rb
  class NodeWrapper (line 3) | class NodeWrapper
    method initialize (line 4) | def initialize(element); @element = element end
    method to_capybara_node (line 5) | def to_capybara_node(); @element end

FILE: lib/capybara/spec/session/window/window_spec.rb
  function win_size (line 93) | def win_size

FILE: lib/capybara/spec/spec_helper.rb
  type Capybara (line 12) | module Capybara
    type SpecHelper (line 13) | module SpecHelper
      function configure (line 15) | def configure(config)
      function reset! (line 22) | def reset!
      function filter (line 45) | def filter(requires, metadata)
      function spec (line 55) | def spec(name, *options, &block)
      function run_specs (line 60) | def run_specs(session, name, **options, &filter_block)
      function reset_threadsafe (line 95) | def reset_threadsafe(bool: false, session: nil)
      function silence_stream (line 104) | def silence_stream(stream)
      function quietly (line 113) | def quietly(&block)
      function extract_results (line 119) | def extract_results(session)
      function extract_content_type (line 126) | def extract_content_type(session)
      function be_an_invalid_element_error (line 131) | def be_an_invalid_element_error(session)
      function with_os_path_separators (line 135) | def with_os_path_separators(path)

FILE: lib/capybara/spec/test_app.rb
  class TestApp (line 8) | class TestApp < Sinatra::Base
    class TestAppError (line 9) | class TestAppError < Exception; end
    class TestAppOtherError (line 11) | class TestAppOtherError < Exception # rubocop:disable Lint/InheritExce...
      method initialize (line 12) | def initialize(string1, msg)

FILE: lib/capybara/version.rb
  type Capybara (line 3) | module Capybara

FILE: lib/capybara/window.rb
  type Capybara (line 3) | module Capybara
    class Window (line 22) | class Window
      method initialize (line 30) | def initialize(session, handle)
      method exists? (line 38) | def exists?
      method closed? (line 44) | def closed?
      method current? (line 50) | def current?
      method close (line 67) | def close
      method size (line 77) | def size
      method resize_to (line 88) | def resize_to(width, height)
      method maximize (line 100) | def maximize
      method fullscreen (line 111) | def fullscreen
      method eql? (line 115) | def eql?(other)
      method hash (line 120) | def hash
      method inspect (line 124) | def inspect
      method wait_for_stable_size (line 130) | def wait_for_stable_size(seconds = session.config.default_max_wait_t...

FILE: spec/dsl_spec.rb
  class TestClass (line 6) | class TestClass

FILE: spec/minitest_spec.rb
  class MinitestTest (line 6) | class MinitestTest < Minitest::Test
    method setup (line 10) | def setup
    method teardown (line 14) | def teardown
    method test_order (line 18) | def self.test_order
    method test_assert_text (line 22) | def test_assert_text
    method test_assert_title (line 28) | def test_assert_title
    method test_assert_current_path (line 35) | def test_assert_current_path
    method test_assert_xpath (line 42) | def test_assert_xpath
    method test_assert_css (line 50) | def test_assert_css
    method test_assert_selector (line 55) | def test_assert_selector
    method test_assert_element (line 63) | def test_assert_element
    method test_assert_link (line 70) | def test_assert_link
    method test_assert_button (line 77) | def test_assert_button
    method test_assert_field (line 83) | def test_assert_field
    method test_assert_select (line 88) | def test_assert_select
    method test_assert_checked_field (line 93) | def test_assert_checked_field
    method test_assert_unchecked_field (line 99) | def test_assert_unchecked_field
    method test_assert_table (line 105) | def test_assert_table
    method test_assert_all_of_selectors (line 112) | def test_assert_all_of_selectors
    method test_assert_none_of_selectors (line 116) | def test_assert_none_of_selectors
    method test_assert_any_of_selectors (line 120) | def test_assert_any_of_selectors
    method test_assert_matches_selector (line 124) | def test_assert_matches_selector
    method test_assert_matches_css (line 130) | def test_assert_matches_css
    method test_assert_matches_xpath (line 135) | def test_assert_matches_xpath
    method test_assert_matches_style (line 140) | def test_assert_matches_style
    method test_assert_ancestor (line 146) | def test_assert_ancestor
    method test_assert_sibling (line 151) | def test_assert_sibling

FILE: spec/minitest_spec_spec.rb
  class MinitestSpecTest (line 7) | class MinitestSpecTest < Minitest::Spec
    method test_order (line 19) | def self.test_order

FILE: spec/rack_test_spec.rb
  type TestSessions (line 5) | module TestSessions
  type CSSHandlerIncludeTester (line 288) | module CSSHandlerIncludeTester
    function dont_extend_css_handler (line 289) | def dont_extend_css_handler

FILE: spec/regexp_dissassembler_spec.rb
  function verify_strings (line 237) | def verify_strings(hsh)
  function verify_alternated_strings (line 244) | def verify_alternated_strings(hsh, wrap: false)

FILE: spec/result_spec.rb
  function recalc_result (line 77) | def recalc_result
  function jruby_lazy_enumerator_workaround? (line 199) | def jruby_lazy_enumerator_workaround?

FILE: spec/rspec/shared_spec_matchers.rb
  function to_s (line 722) | def to_s

FILE: spec/rspec_matchers_spec.rb
  function error_msg_for (line 84) | def error_msg_for(&block)

FILE: spec/sauce_spec_chrome.rb
  type TestSessions (line 36) | module TestSessions

FILE: spec/selenium_spec_chrome.rb
  type TestSessions (line 79) | module TestSessions

FILE: spec/selenium_spec_chrome_remote.rb
  function selenium_host (line 9) | def selenium_host
  function selenium_port (line 13) | def selenium_port
  function ensure_selenium_running! (line 17) | def ensure_selenium_running!
  function selenium_gte? (line 34) | def selenium_gte?(version)
  type TestSessions (line 52) | module TestSessions

FILE: spec/selenium_spec_edge.rb
  type TestSessions (line 38) | module TestSessions

FILE: spec/selenium_spec_firefox.rb
  type TestSessions (line 46) | module TestSessions

FILE: spec/selenium_spec_firefox_remote.rb
  function selenium_host (line 9) | def selenium_host
  function selenium_port (line 13) | def selenium_port
  function ensure_selenium_running! (line 17) | def ensure_selenium_running!
  type TestSessions (line 48) | module TestSessions

FILE: spec/selenium_spec_ie.rb
  function selenium_host (line 17) | def selenium_host
  function selenium_port (line 21) | def selenium_port
  function server_host (line 25) | def server_host
  type TestSessions (line 52) | module TestSessions

FILE: spec/selenium_spec_safari.rb
  type TestSessions (line 47) | module TestSessions

FILE: spec/server_spec.rb
  function start_request (line 307) | def start_request(server, wait_time)

FILE: spec/shared_selenium_session.rb
  function headless_or_remote? (line 562) | def headless_or_remote?

FILE: spec/spec_helper.rb
  type Capybara (line 14) | module Capybara
    type SpecHelper (line 15) | module SpecHelper
      function firefox? (line 16) | def firefox?(session)
      function firefox_lt? (line 22) | def firefox_lt?(version, session)
      function firefox_gte? (line 26) | def firefox_gte?(version, session)
      function geckodriver_version (line 30) | def geckodriver_version(session)
      function geckodriver_gte? (line 34) | def geckodriver_gte?(version, session)
      function geckodriver_lt? (line 38) | def geckodriver_lt?(version, session)
      function chrome? (line 42) | def chrome?(session)
      function chrome_version (line 46) | def chrome_version(session)
      function chrome_lt? (line 51) | def chrome_lt?(version, session)
      function chrome_gte? (line 55) | def chrome_gte?(version, session)
      function chromedriver_version (line 59) | def chromedriver_version(session)
      function chromedriver_gte? (line 63) | def chromedriver_gte?(version, session)
      function chromedriver_lt? (line 67) | def chromedriver_lt?(version, session)
      function selenium? (line 71) | def selenium?(session)
      function selenium_lt? (line 75) | def selenium_lt?(version, session)
      function edge? (line 80) | def edge?(session)
      function legacy_edge? (line 84) | def legacy_edge?(session)
      function edge_lt? (line 88) | def edge_lt?(version, session)
      function edge_gte? (line 92) | def edge_gte?(version, session)
      function ie? (line 96) | def ie?(session)
      function safari? (line 100) | def safari?(session)
      function browser_name (line 104) | def browser_name(session)
      function remote? (line 108) | def remote?(session)
      function log_selenium_driver_version (line 112) | def self.log_selenium_driver_version(mod)
Condensed preview — 342 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,812K chars).
[
  {
    "path": ".codeclimate.yml",
    "chars": 878,
    "preview": "---\nversion: \"2\"\nchecks:\n  method-count:\n    enabled: false\n  file-lines:\n    config:\n      threshold: 500\n  method-comp"
  },
  {
    "path": ".gitattributes",
    "chars": 36,
    "preview": "lib/capybara/spec/views/*.erb eol=lf"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "chars": 587,
    "preview": "**Note:** This is for issues with Capybara.  If you have a howto type question, please ask on the mailing list as reques"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 118,
    "preview": "version: 2\nupdates:\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"weekly\"\n"
  },
  {
    "path": ".github/lock.yml",
    "chars": 996,
    "preview": "# Configuration for Lock Threads - https://github.com/dessant/lock-threads\n\n# Number of days of inactivity before a clos"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 4224,
    "preview": "# This workflow will download a prebuilt Ruby version, install dependencies and\n# run tests with Rake\n# For more informa"
  },
  {
    "path": ".gitignore",
    "chars": 250,
    "preview": ".rbx\n.idea/\n.DS_Store\npkg\ntmp\n*~\n*swp\n*gem\nspec.opts\n.rvmrc\n.ruby-version\n.java-version\n.ruby-gemset\ncapybara-*.html\n.ya"
  },
  {
    "path": ".rspec",
    "chars": 93,
    "preview": "--color\n--order random\n--require rspec/instafail\n--format RSpec::Instafail\n--format progress\n"
  },
  {
    "path": ".rubocop.yml",
    "chars": 4544,
    "preview": "plugins:\n  - rubocop-minitest\n  - rubocop-performance\n  - rubocop-rake\n  - rubocop-capybara\n  - rubocop-rspec\n\nAllCops:\n"
  },
  {
    "path": ".yardopts",
    "chars": 18,
    "preview": "--markup markdown\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2125,
    "preview": "## Questions about Capybara?\n\nTo get your questions answered, please ask on the [mailing list]. Do not open\nan issue.\n\n#"
  },
  {
    "path": "Gemfile",
    "chars": 234,
    "preview": "# frozen_string_literal: true\n\nsource 'https://rubygems.org'\n\ngem 'bundler', '< 3.0'\ngemspec\n\ngem 'xpath', github: 'team"
  },
  {
    "path": "History.md",
    "chars": 79377,
    "preview": "# Version 3.40.0\nRelease date: 2024-01-26\n\n### Changned\n\n* Dropped support for Ruby 2.7, 3.0+ is now required\n* Dropped "
  },
  {
    "path": "License.txt",
    "chars": 1097,
    "preview": "(The MIT License)\n\nCopyright (c) 2009-2018 Thomas Walpole, Jonas Nicklas\n\nPermission is hereby granted, free of charge, "
  },
  {
    "path": "README.md",
    "chars": 44336,
    "preview": "# Capybara\n\n[![Build Status](https://github.com/teamcapybara/capybara/actions/workflows/build.yml/badge.svg)](https://gi"
  },
  {
    "path": "Rakefile",
    "chars": 2801,
    "preview": "# frozen_string_literal: true\n\nrequire 'rubygems'\nrequire 'rspec/core/rake_task'\nrequire 'cucumber/rake/task'\nrequire 'y"
  },
  {
    "path": "UPGRADING.md",
    "chars": 1891,
    "preview": "# Upgrading from Capybara 2.x to 3.x\n\n## Server\n\nCapybara 3 changes the default server to <a href=\"https://github.com/pu"
  },
  {
    "path": "appveyor.yml.outdated",
    "chars": 1531,
    "preview": "version: 1.0.{build}-{branch}\n\ncache:\n  - vendor/bundle\n\n# image: Visual Studio 2017\n\nenvironment:\n  matrix:\n    - RUBY_"
  },
  {
    "path": "capybara.gemspec",
    "chars": 3181,
    "preview": "# frozen_string_literal: true\n\nlib = File.expand_path('lib', __dir__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'c"
  },
  {
    "path": "docker-compose.yml",
    "chars": 357,
    "preview": "version: \"3\"\nservices:\n  selenium_chrome:\n    network_mode: \"host\"\n    image: \"selenium/${SELENIUM_IMAGE:-standalone-chr"
  },
  {
    "path": "features/capybara.feature",
    "chars": 913,
    "preview": "Feature: Capybara's cucumber integration\n  In order to integrate with the lovely plain text testing framework\n  As Capyb"
  },
  {
    "path": "features/named_driver_feature.feature",
    "chars": 189,
    "preview": "@named_test\nFeature: an entire feature that uses a driver by tag\n\n  Scenario: should use the named driver without being "
  },
  {
    "path": "features/step_definitions/capybara_steps.rb",
    "chars": 622,
    "preview": "# frozen_string_literal: true\n\nWhen(/^I visit the (?:root|home) page$/) do\n  visit('/')\nend\n\nThen(/^I should see \"([^\"]*"
  },
  {
    "path": "features/support/env.rb",
    "chars": 516,
    "preview": "# frozen_string_literal: true\n\nrequire 'rubygems'\nrequire 'bundler/setup'\n\nrequire 'capybara/cucumber'\nrequire 'capybara"
  },
  {
    "path": "gem-public_cert.pem",
    "chars": 1184,
    "preview": "-----BEGIN CERTIFICATE-----\nMIIDPDCCAiSgAwIBAgIBADANBgkqhkiG9w0BAQUFADBEMRYwFAYDVQQDDA1qb25h\ncy5uaWNrbGFzMRUwEwYKCZImiZP"
  },
  {
    "path": "gemfiles/Gemfile.base-versions",
    "chars": 227,
    "preview": "source 'https://rubygems.org'\n\ngem 'bundler', '< 3.0'\ngemspec path: '..'\n\ngem 'rack', '~>2.0.0'\ngem 'nokogiri', '~>1.11."
  },
  {
    "path": "gemfiles/Gemfile.beta-versions",
    "chars": 801,
    "preview": "source \"https://rubygems.org\"\n\ngem 'bundler', '< 3.0'\ngemspec path: '..'\n\ngem 'pkg-config' # needed by nokogiri\ngem 'xpa"
  },
  {
    "path": "gemfiles/Gemfile.chrome_edge",
    "chars": 319,
    "preview": "source \"https://rubygems.org\"\n\ngem 'bundler', '< 3.0'\ngemspec path: '..'\n\ngem 'xpath', github: 'teamcapybara/xpath'\n\ngem"
  },
  {
    "path": "gemfiles/Gemfile.edge-firefox",
    "chars": 278,
    "preview": "source \"https://rubygems.org\"\n\ngem 'bundler', '< 3.0'\ngemspec path: '..'\n\ngem 'xpath', github: 'teamcapybara/xpath'\n\ngem"
  },
  {
    "path": "gemfiles/Gemfile.ie",
    "chars": 73,
    "preview": "source 'https://rubygems.org'\n\ngem 'bundler', '< 3.0'\ngemspec path: '..'\n"
  },
  {
    "path": "gemfiles/Gemfile.rack2",
    "chars": 114,
    "preview": "source \"https://rubygems.org\"\n\ngem 'bundler', '< 3.0'\ngemspec path: '..'\n\ngem 'rack', '~>2.0'\ngem 'sinatra', '~>3'"
  },
  {
    "path": "gemfiles/Gemfile.rack3",
    "chars": 127,
    "preview": "source \"https://rubygems.org\"\n\ngem 'bundler', '< 3.0'\ngemspec path: '..'\n\ngem 'rack', '~>3.0'\ngem 'rackup'\ngem 'sinatra'"
  },
  {
    "path": "lib/capybara/config.rb",
    "chars": 2928,
    "preview": "# frozen_string_literal: true\n\nrequire 'forwardable'\nrequire 'capybara/session/config'\n\nmodule Capybara\n  class Config\n "
  },
  {
    "path": "lib/capybara/cucumber.rb",
    "chars": 544,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/dsl'\nrequire 'capybara/rspec/matchers'\nrequire 'capybara/rspec/matcher_"
  },
  {
    "path": "lib/capybara/driver/base.rb",
    "chars": 4880,
    "preview": "# frozen_string_literal: true\n\nclass Capybara::Driver::Base\n  attr_writer :session\n\n  def current_url\n    raise NotImple"
  },
  {
    "path": "lib/capybara/driver/node.rb",
    "chars": 2943,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Driver\n    class Node\n      attr_reader :driver, :native, :initi"
  },
  {
    "path": "lib/capybara/dsl.rb",
    "chars": 1301,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara'\n\nmodule Capybara\n  module DSL\n    def self.included(base)\n      warn '"
  },
  {
    "path": "lib/capybara/helpers.rb",
    "chars": 3969,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  # @api private\n  module Helpers\n  module_function\n\n    ##\n    # @deprec"
  },
  {
    "path": "lib/capybara/minitest/spec.rb",
    "chars": 8035,
    "preview": "# frozen_string_literal: true\n\nrequire 'minitest/spec'\n\nmodule Capybara\n  module Minitest\n    module Expectations\n      "
  },
  {
    "path": "lib/capybara/minitest.rb",
    "chars": 12692,
    "preview": "# frozen_string_literal: true\n\nrequire 'minitest'\nrequire 'capybara/dsl'\n\nmodule Capybara\n  module Minitest\n    module A"
  },
  {
    "path": "lib/capybara/node/actions.rb",
    "chars": 19865,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Node\n    module Actions\n      # @!macro waiting_behavior\n      #"
  },
  {
    "path": "lib/capybara/node/base.rb",
    "chars": 5278,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Node\n    ##\n    #\n    # A {Capybara::Node::Base} represents eith"
  },
  {
    "path": "lib/capybara/node/document.rb",
    "chars": 1076,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Node\n    ##\n    #\n    # A {Capybara::Document} represents an HTM"
  },
  {
    "path": "lib/capybara/node/document_matchers.rb",
    "chars": 2245,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Node\n    module DocumentMatchers\n      ##\n      # Asserts that t"
  },
  {
    "path": "lib/capybara/node/element.rb",
    "chars": 20212,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Node\n    ##\n    #\n    # A {Capybara::Node::Element} represents a"
  },
  {
    "path": "lib/capybara/node/finders.rb",
    "chars": 17704,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Node\n    module Finders\n      ##\n      #\n      # Find an {Capyba"
  },
  {
    "path": "lib/capybara/node/matchers.rb",
    "chars": 38212,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Node\n    module Matchers\n      ##\n      #\n      # Checks if a gi"
  },
  {
    "path": "lib/capybara/node/simple.rb",
    "chars": 5650,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Node\n    ##\n    #\n    # A {Capybara::Node::Simple} is a simpler "
  },
  {
    "path": "lib/capybara/node/whitespace_normalizer.rb",
    "chars": 2290,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Node\n    ##\n    #\n    # {Capybara::Node::WhitespaceNormalizer} p"
  },
  {
    "path": "lib/capybara/queries/active_element_query.rb",
    "chars": 384,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  # @api private\n  module Queries\n    class ActiveElementQuery < BaseQuer"
  },
  {
    "path": "lib/capybara/queries/ancestor_query.rb",
    "chars": 957,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Queries\n    class AncestorQuery < Capybara::Queries::SelectorQue"
  },
  {
    "path": "lib/capybara/queries/base_query.rb",
    "chars": 3261,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  # @api private\n  module Queries\n    class BaseQuery\n      COUNT_KEYS = "
  },
  {
    "path": "lib/capybara/queries/current_path_query.rb",
    "chars": 1644,
    "preview": "# frozen_string_literal: true\n\nrequire 'addressable/uri'\n\nmodule Capybara\n  # @api private\n  module Queries\n    class Cu"
  },
  {
    "path": "lib/capybara/queries/match_query.rb",
    "chars": 565,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Queries\n    class MatchQuery < Capybara::Queries::SelectorQuery\n"
  },
  {
    "path": "lib/capybara/queries/selector_query.rb",
    "chars": 23479,
    "preview": "# frozen_string_literal: true\n\nrequire 'matrix'\n\nmodule Capybara\n  module Queries\n    class SelectorQuery < Queries::Bas"
  },
  {
    "path": "lib/capybara/queries/sibling_query.rb",
    "chars": 977,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Queries\n    class SiblingQuery < SelectorQuery\n      # @api priv"
  },
  {
    "path": "lib/capybara/queries/style_query.rb",
    "chars": 1057,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  # @api private\n  module Queries\n    class StyleQuery < BaseQuery\n      "
  },
  {
    "path": "lib/capybara/queries/text_query.rb",
    "chars": 3665,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  # @api private\n  module Queries\n    class TextQuery < BaseQuery\n      d"
  },
  {
    "path": "lib/capybara/queries/title_query.rb",
    "chars": 1019,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  # @api private\n  module Queries\n    class TitleQuery < BaseQuery\n      "
  },
  {
    "path": "lib/capybara/rack_test/browser.rb",
    "chars": 4709,
    "preview": "# frozen_string_literal: true\n\nclass Capybara::RackTest::Browser\n  include ::Rack::Test::Methods\n\n  attr_reader :driver\n"
  },
  {
    "path": "lib/capybara/rack_test/css_handlers.rb",
    "chars": 282,
    "preview": "# frozen_string_literal: true\n\nclass Capybara::RackTest::CSSHandlers < BasicObject\n  include ::Kernel\n\n  def disabled(li"
  },
  {
    "path": "lib/capybara/rack_test/driver.rb",
    "chars": 2060,
    "preview": "# frozen_string_literal: true\n\nrequire 'rack/test'\nrequire 'rack/utils'\nrequire 'mini_mime'\nrequire 'nokogiri'\n\nclass Ca"
  },
  {
    "path": "lib/capybara/rack_test/errors.rb",
    "chars": 126,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara::RackTest::Errors\n  class StaleElementReferenceError < StandardError\n  en"
  },
  {
    "path": "lib/capybara/rack_test/form.rb",
    "chars": 4927,
    "preview": "# frozen_string_literal: true\n\nclass Capybara::RackTest::Form < Capybara::RackTest::Node\n  # This only needs to inherit "
  },
  {
    "path": "lib/capybara/rack_test/node.rb",
    "chars": 8431,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rack_test/errors'\nrequire 'capybara/node/whitespace_normalizer'\n\nclass "
  },
  {
    "path": "lib/capybara/rails.rb",
    "chars": 387,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/dsl'\n\nCapybara.app = Rack::Builder.new do\n  map '/' do\n    run Rails.ap"
  },
  {
    "path": "lib/capybara/registration_container.rb",
    "chars": 976,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  # @api private\n  class RegistrationContainer\n    def names\n      @regis"
  },
  {
    "path": "lib/capybara/registrations/drivers.rb",
    "chars": 2195,
    "preview": "# frozen_string_literal: true\n\nCapybara.register_driver :rack_test do |app|\n  Capybara::RackTest::Driver.new(app)\nend\n\nC"
  },
  {
    "path": "lib/capybara/registrations/patches/puma_ssl.rb",
    "chars": 654,
    "preview": "# frozen_string_literal: true\n\nmodule Puma\n  module MiniSSL\n    class Socket\n      def read_nonblock(size, *_)\n        w"
  },
  {
    "path": "lib/capybara/registrations/servers.rb",
    "chars": 2849,
    "preview": "# frozen_string_literal: true\n\nCapybara.register_server :default do |app, port, _host|\n  Capybara.run_default_server(app"
  },
  {
    "path": "lib/capybara/result.rb",
    "chars": 4748,
    "preview": "# frozen_string_literal: true\n\nrequire 'forwardable'\n\nmodule Capybara\n  ##\n  # A {Capybara::Result} represents a collect"
  },
  {
    "path": "lib/capybara/rspec/features.rb",
    "chars": 909,
    "preview": "# frozen_string_literal: true\n\nRSpec.shared_context 'Capybara Features', capybara_feature: true do\n  instance_eval do\n  "
  },
  {
    "path": "lib/capybara/rspec/matcher_proxies.rb",
    "chars": 1974,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module RSpecMatcherProxies\n    def all(*args, **kwargs, &block)\n      i"
  },
  {
    "path": "lib/capybara/rspec/matchers/base.rb",
    "chars": 3133,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rspec/matchers/compound'\nrequire 'capybara/rspec/matchers/count_sugar'\n"
  },
  {
    "path": "lib/capybara/rspec/matchers/become_closed.rb",
    "chars": 858,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module RSpecMatchers\n    module Matchers\n      class BecomeClosed\n     "
  },
  {
    "path": "lib/capybara/rspec/matchers/compound.rb",
    "chars": 2199,
    "preview": "# frozen_string_literal: true\n\nif defined?(RSpec::Expectations::Version)\n  module Capybara\n    module RSpecMatchers\n    "
  },
  {
    "path": "lib/capybara/rspec/matchers/count_sugar.rb",
    "chars": 627,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module RSpecMatchers\n    module CountSugar\n      def once; exactly(1); "
  },
  {
    "path": "lib/capybara/rspec/matchers/have_ancestor.rb",
    "chars": 805,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rspec/matchers/base'\n\nmodule Capybara\n  module RSpecMatchers\n    module"
  },
  {
    "path": "lib/capybara/rspec/matchers/have_current_path.rb",
    "chars": 627,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rspec/matchers/base'\n\nmodule Capybara\n  module RSpecMatchers\n    module"
  },
  {
    "path": "lib/capybara/rspec/matchers/have_selector.rb",
    "chars": 2154,
    "preview": "# frozen_string_literal: true\n\n# rubocop:disable Naming/PredicatePrefix\n\nrequire 'capybara/rspec/matchers/base'\n\nmodule "
  },
  {
    "path": "lib/capybara/rspec/matchers/have_sibling.rb",
    "chars": 703,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rspec/matchers/base'\n\nmodule Capybara\n  module RSpecMatchers\n    module"
  },
  {
    "path": "lib/capybara/rspec/matchers/have_text.rb",
    "chars": 645,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rspec/matchers/base'\n\nmodule Capybara\n  module RSpecMatchers\n    module"
  },
  {
    "path": "lib/capybara/rspec/matchers/have_title.rb",
    "chars": 542,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rspec/matchers/base'\n\nmodule Capybara\n  module RSpecMatchers\n    module"
  },
  {
    "path": "lib/capybara/rspec/matchers/match_selector.rb",
    "chars": 706,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rspec/matchers/have_selector'\n\nmodule Capybara\n  module RSpecMatchers\n "
  },
  {
    "path": "lib/capybara/rspec/matchers/match_style.rb",
    "chars": 1025,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rspec/matchers/base'\n\nmodule Capybara\n  module RSpecMatchers\n    module"
  },
  {
    "path": "lib/capybara/rspec/matchers/spatial_sugar.rb",
    "chars": 608,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module RSpecMatchers\n    module SpatialSugar\n      def above(el)\n      "
  },
  {
    "path": "lib/capybara/rspec/matchers.rb",
    "chars": 7426,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/rspec/matchers/have_selector'\nrequire 'capybara/rspec/matchers/have_anc"
  },
  {
    "path": "lib/capybara/rspec.rb",
    "chars": 1017,
    "preview": "# frozen_string_literal: true\n\nrequire 'rspec/core'\nrequire 'capybara/dsl'\nrequire 'capybara/rspec/matchers'\nrequire 'ca"
  },
  {
    "path": "lib/capybara/selector/builders/css_builder.rb",
    "chars": 2648,
    "preview": "# frozen_string_literal: true\n\nrequire 'xpath'\n\nmodule Capybara\n  class Selector\n    # @api private\n    class CSSBuilder"
  },
  {
    "path": "lib/capybara/selector/builders/xpath_builder.rb",
    "chars": 1993,
    "preview": "# frozen_string_literal: true\n\nrequire 'xpath'\n\nmodule Capybara\n  class Selector\n    # @api private\n    class XPathBuild"
  },
  {
    "path": "lib/capybara/selector/css.rb",
    "chars": 2730,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selector/selector'\n\nmodule Capybara\n  class Selector\n    class CSS\n    "
  },
  {
    "path": "lib/capybara/selector/definition/button.rb",
    "chars": 2760,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:button, locator_type: [String, Symbol]) do\n  xpath(:value, :title,"
  },
  {
    "path": "lib/capybara/selector/definition/checkbox.rb",
    "chars": 836,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:checkbox, locator_type: [String, Symbol]) do\n  xpath do |locator, "
  },
  {
    "path": "lib/capybara/selector/definition/css.rb",
    "chars": 367,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:css, locator_type: [String, Symbol], raw_locator: true) do\n  css d"
  },
  {
    "path": "lib/capybara/selector/definition/datalist_input.rb",
    "chars": 1161,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:datalist_input, locator_type: [String, Symbol]) do\n  label 'input "
  },
  {
    "path": "lib/capybara/selector/definition/datalist_option.rb",
    "chars": 796,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:datalist_option, locator_type: [String, Symbol]) do\n  label 'datal"
  },
  {
    "path": "lib/capybara/selector/definition/element.rb",
    "chars": 937,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:element, locator_type: [String, Symbol]) do\n  xpath do |locator, *"
  },
  {
    "path": "lib/capybara/selector/definition/field.rb",
    "chars": 1263,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:field, locator_type: [String, Symbol]) do\n  visible { |options| :h"
  },
  {
    "path": "lib/capybara/selector/definition/fieldset.rb",
    "chars": 659,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:fieldset, locator_type: [String, Symbol]) do\n  xpath do |locator, "
  },
  {
    "path": "lib/capybara/selector/definition/file_field.rb",
    "chars": 398,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:file_field, locator_type: [String, Symbol]) do\n  label 'file field"
  },
  {
    "path": "lib/capybara/selector/definition/fillable_field.rb",
    "chars": 1039,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:fillable_field, locator_type: [String, Symbol]) do\n  label 'field'"
  },
  {
    "path": "lib/capybara/selector/definition/frame.rb",
    "chars": 578,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:frame, locator_type: [String, Symbol]) do\n  xpath do |locator, nam"
  },
  {
    "path": "lib/capybara/selector/definition/id.rb",
    "chars": 260,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:id, locator_type: [String, Symbol, Regexp]) do\n  xpath { |id| buil"
  },
  {
    "path": "lib/capybara/selector/definition/label.rb",
    "chars": 2061,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:label, locator_type: [String, Symbol]) do\n  label 'label'\n  xpath("
  },
  {
    "path": "lib/capybara/selector/definition/link.rb",
    "chars": 2096,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:link, locator_type: [String, Symbol]) do\n  xpath do |locator, href"
  },
  {
    "path": "lib/capybara/selector/definition/link_or_button.rb",
    "chars": 493,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:link_or_button, locator_type: [String, Symbol]) do\n  label 'link o"
  },
  {
    "path": "lib/capybara/selector/definition/option.rb",
    "chars": 975,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:option, locator_type: [String, Symbol, Integer]) do\n  xpath do |lo"
  },
  {
    "path": "lib/capybara/selector/definition/radio_button.rb",
    "chars": 860,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:radio_button, locator_type: [String, Symbol]) do\n  label 'radio bu"
  },
  {
    "path": "lib/capybara/selector/definition/select.rb",
    "chars": 2790,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:select, locator_type: [String, Symbol]) do\n  label 'select box'\n\n "
  },
  {
    "path": "lib/capybara/selector/definition/table.rb",
    "chars": 3633,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:table, locator_type: [String, Symbol]) do\n  xpath do |locator, cap"
  },
  {
    "path": "lib/capybara/selector/definition/table_row.rb",
    "chars": 873,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:table_row, locator_type: [Array, Hash]) do\n  xpath do |locator|\n  "
  },
  {
    "path": "lib/capybara/selector/definition/xpath.rb",
    "chars": 148,
    "preview": "# frozen_string_literal: true\n\nCapybara.add_selector(:xpath, locator_type: [:to_xpath, String], raw_locator: true) do\n  "
  },
  {
    "path": "lib/capybara/selector/definition.rb",
    "chars": 11021,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selector/filter_set'\nrequire 'capybara/selector/css'\nrequire 'capybara/"
  },
  {
    "path": "lib/capybara/selector/filter.rb",
    "chars": 184,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selector/filters/node_filter'\nrequire 'capybara/selector/filters/expres"
  },
  {
    "path": "lib/capybara/selector/filter_set.rb",
    "chars": 3997,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selector/filter'\n\nmodule Capybara\n  class Selector\n    class FilterSet\n"
  },
  {
    "path": "lib/capybara/selector/filters/base.rb",
    "chars": 1866,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  class Selector\n    module Filters\n      class Base\n        def initiali"
  },
  {
    "path": "lib/capybara/selector/filters/expression_filter.rb",
    "chars": 559,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selector/filters/base'\n\nmodule Capybara\n  class Selector\n    module Fil"
  },
  {
    "path": "lib/capybara/selector/filters/locator_filter.rb",
    "chars": 722,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selector/filters/base'\n\nmodule Capybara\n  class Selector\n    module Fil"
  },
  {
    "path": "lib/capybara/selector/filters/node_filter.rb",
    "chars": 782,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selector/filters/base'\n\nmodule Capybara\n  class Selector\n    module Fil"
  },
  {
    "path": "lib/capybara/selector/regexp_disassembler.rb",
    "chars": 5467,
    "preview": "# frozen_string_literal: true\n\nrequire 'regexp_parser'\n\nmodule Capybara\n  class Selector\n    # @api private\n    class Re"
  },
  {
    "path": "lib/capybara/selector/selector.rb",
    "chars": 4489,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  class Selector < SimpleDelegator\n    class << self\n      def all\n      "
  },
  {
    "path": "lib/capybara/selector/xpath_extensions.rb",
    "chars": 271,
    "preview": "# frozen_string_literal: true\n\nmodule XPath\n  class Renderer\n    def join(*expressions)\n      expressions.join('/')\n    "
  },
  {
    "path": "lib/capybara/selector.rb",
    "chars": 21334,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selector/xpath_extensions'\nrequire 'capybara/selector/selector'\nrequire"
  },
  {
    "path": "lib/capybara/selenium/atoms/src/getAttribute.js",
    "chars": 3999,
    "preview": "(function(){\n  var BOOLEAN_PROPERTIES = [\n    \"allowfullscreen\",\n    \"allowpaymentrequest\",\n    \"allowusermedia\",\n    \"a"
  },
  {
    "path": "lib/capybara/selenium/atoms/src/isDisplayed.js",
    "chars": 16668,
    "preview": "(function(){\n  var OverflowState = {\n    NONE: \"none\",\n    HIDDEN: \"hidden\",\n    SCROLL: \"scroll\"\n  };\n\n  function isSho"
  },
  {
    "path": "lib/capybara/selenium/driver.rb",
    "chars": 15154,
    "preview": "# frozen_string_literal: true\n\nrequire 'uri'\nrequire 'English'\n\nclass Capybara::Selenium::Driver < Capybara::Driver::Bas"
  },
  {
    "path": "lib/capybara/selenium/driver_specializations/chrome_driver.rb",
    "chars": 3448,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selenium/nodes/chrome_node'\nrequire 'capybara/selenium/patches/logs'\n\nm"
  },
  {
    "path": "lib/capybara/selenium/driver_specializations/edge_driver.rb",
    "chars": 3760,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selenium/nodes/edge_node'\n\nmodule Capybara::Selenium::Driver::EdgeDrive"
  },
  {
    "path": "lib/capybara/selenium/driver_specializations/firefox_driver.rb",
    "chars": 2555,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selenium/nodes/firefox_node'\n\nmodule Capybara::Selenium::Driver::Firefo"
  },
  {
    "path": "lib/capybara/selenium/driver_specializations/internet_explorer_driver.rb",
    "chars": 861,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selenium/nodes/ie_node'\n\nmodule Capybara::Selenium::Driver::InternetExp"
  },
  {
    "path": "lib/capybara/selenium/driver_specializations/safari_driver.rb",
    "chars": 806,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selenium/nodes/safari_node'\n\nmodule Capybara::Selenium::Driver::SafariD"
  },
  {
    "path": "lib/capybara/selenium/extensions/file_input_click_emulation.rb",
    "chars": 791,
    "preview": "# frozen_string_literal: true\n\nclass Capybara::Selenium::Node\n  module FileInputClickEmulation\n    def click(keys = [], "
  },
  {
    "path": "lib/capybara/selenium/extensions/find.rb",
    "chars": 4018,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Selenium\n    module Find\n      def find_xpath(selector, uses_vis"
  },
  {
    "path": "lib/capybara/selenium/extensions/html5_drag.rb",
    "chars": 7545,
    "preview": "# frozen_string_literal: true\n\nclass Capybara::Selenium::Node\n  module Html5Drag\n    # Implement methods to emulate HTML"
  },
  {
    "path": "lib/capybara/selenium/extensions/modifier_keys_stack.rb",
    "chars": 371,
    "preview": "# frozen_string_literal: true\n\nclass Capybara::Selenium::Node\n  #\n  # @api private\n  #\n  class ModifierKeysStack\n    def"
  },
  {
    "path": "lib/capybara/selenium/extensions/scroll.rb",
    "chars": 2144,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Selenium\n    module Scroll\n      def scroll_by(x, y)\n        dri"
  },
  {
    "path": "lib/capybara/selenium/node.rb",
    "chars": 17374,
    "preview": "# frozen_string_literal: true\n\n# Selenium specific implementation of the Capybara::Driver::Node API\n\nrequire 'capybara/s"
  },
  {
    "path": "lib/capybara/selenium/nodes/chrome_node.rb",
    "chars": 4315,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selenium/extensions/html5_drag'\nrequire 'capybara/selenium/extensions/f"
  },
  {
    "path": "lib/capybara/selenium/nodes/edge_node.rb",
    "chars": 3003,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selenium/extensions/html5_drag'\n\nclass Capybara::Selenium::EdgeNode < C"
  },
  {
    "path": "lib/capybara/selenium/nodes/firefox_node.rb",
    "chars": 4457,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selenium/extensions/html5_drag'\nrequire 'capybara/selenium/extensions/f"
  },
  {
    "path": "lib/capybara/selenium/nodes/ie_node.rb",
    "chars": 623,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/selenium/extensions/html5_drag'\n\nclass Capybara::Selenium::IENode < Cap"
  },
  {
    "path": "lib/capybara/selenium/nodes/safari_node.rb",
    "chars": 4093,
    "preview": "# frozen_string_literal: true\n\n# require 'capybara/selenium/extensions/html5_drag'\nrequire 'capybara/selenium/extensions"
  },
  {
    "path": "lib/capybara/selenium/patches/atoms.rb",
    "chars": 428,
    "preview": "# frozen_string_literal: true\n\nmodule CapybaraAtoms\nprivate\n\n  def read_atom(function)\n    @atoms ||= Hash.new do |hash,"
  },
  {
    "path": "lib/capybara/selenium/patches/is_displayed.rb",
    "chars": 303,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Selenium\n    module IsDisplayed\n      def commands(command)\n    "
  },
  {
    "path": "lib/capybara/selenium/patches/logs.rb",
    "chars": 1367,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Selenium\n    module ChromeLogs\n      LOG_MSG = <<~MSG\n        Ch"
  },
  {
    "path": "lib/capybara/selenium/patches/pause_duration_fix.rb",
    "chars": 196,
    "preview": "# frozen_string_literal: true\n\nmodule PauseDurationFix\n  def encode\n    super.tap { |output| output[:duration] ||= 0 }\n "
  },
  {
    "path": "lib/capybara/selenium/patches/persistent_client.rb",
    "chars": 358,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module Selenium\n    class PersistentClient < ::Selenium::WebDriver::Rem"
  },
  {
    "path": "lib/capybara/server/animation_disabler.rb",
    "chars": 2482,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  class Server\n    class AnimationDisabler\n      def self.selector_for(cs"
  },
  {
    "path": "lib/capybara/server/checker.rb",
    "chars": 929,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  class Server\n    class Checker\n      TRY_HTTPS_ERRORS = [EOFError, Net:"
  },
  {
    "path": "lib/capybara/server/middleware.rb",
    "chars": 1516,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  class Server\n    class Middleware\n      class Counter\n        def initi"
  },
  {
    "path": "lib/capybara/server.rb",
    "chars": 3268,
    "preview": "# frozen_string_literal: true\n\nrequire 'uri'\nrequire 'net/http'\nrequire 'rack'\nrequire 'capybara/server/middleware'\nrequ"
  },
  {
    "path": "lib/capybara/session/config.rb",
    "chars": 3992,
    "preview": "# frozen_string_literal: true\n\nrequire 'delegate'\n\nmodule Capybara\n  class SessionConfig\n    OPTIONS = %i[always_include"
  },
  {
    "path": "lib/capybara/session/matchers.rb",
    "chars": 3751,
    "preview": "# frozen_string_literal: true\n\nmodule Capybara\n  module SessionMatchers\n    ##\n    # Asserts that the page has the given"
  },
  {
    "path": "lib/capybara/session.rb",
    "chars": 33174,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/session/matchers'\nrequire 'addressable/uri'\n\nmodule Capybara\n  ##\n  #\n "
  },
  {
    "path": "lib/capybara/spec/fixtures/another_test_file.txt",
    "chars": 23,
    "preview": "ThisIsTheOtherTestFile\n"
  },
  {
    "path": "lib/capybara/spec/fixtures/no_extension",
    "chars": 22,
    "preview": "ThisFileHAsNoExtension"
  },
  {
    "path": "lib/capybara/spec/fixtures/test_file.txt",
    "chars": 17,
    "preview": "ThisIsTheTestFile"
  },
  {
    "path": "lib/capybara/spec/public/jquery-ui.js",
    "chars": 240427,
    "preview": "/*! jQuery UI - v1.11.4 - 2015-03-11\n* http://jqueryui.com\n* Includes: core.js, widget.js, mouse.js, position.js, accord"
  },
  {
    "path": "lib/capybara/spec/public/jquery.js",
    "chars": 97163,
    "preview": "/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */\n!function(a,b){\"object\"==typeof module&&\"object\"==typ"
  },
  {
    "path": "lib/capybara/spec/public/offset.js",
    "chars": 227,
    "preview": "$(function() {\n  $(document).on('click dblclick contextmenu', function(e){\n    e.preventDefault();\n    $(document.body)."
  },
  {
    "path": "lib/capybara/spec/public/test.js",
    "chars": 10033,
    "preview": "var activeRequests = 0;\n$(function() {\n  $('#change').text('I changed it');\n  $('#drag, #drag_scroll, #drag_link').dragg"
  },
  {
    "path": "lib/capybara/spec/session/accept_alert_spec.rb",
    "chars": 2507,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#accept_alert', requires: [:modals] do\n  before do\n    @sessio"
  },
  {
    "path": "lib/capybara/spec/session/accept_confirm_spec.rb",
    "chars": 900,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#accept_confirm', requires: [:modals] do\n  before do\n    @sess"
  },
  {
    "path": "lib/capybara/spec/session/accept_prompt_spec.rb",
    "chars": 2659,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#accept_prompt', requires: [:modals] do\n  before do\n    @sessi"
  },
  {
    "path": "lib/capybara/spec/session/active_element_spec.rb",
    "chars": 998,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#active_element', requires: [:active_element] do\n  it 'should "
  },
  {
    "path": "lib/capybara/spec/session/all_spec.rb",
    "chars": 10461,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#all' do\n  before do\n    @session.visit('/with_html')\n  end\n\n "
  },
  {
    "path": "lib/capybara/spec/session/ancestor_spec.rb",
    "chars": 3089,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#ancestor' do\n  before do\n    @session.visit('/with_html')\n  e"
  },
  {
    "path": "lib/capybara/spec/session/assert_all_of_selectors_spec.rb",
    "chars": 5717,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#assert_all_of_selectors' do\n  before do\n    @session.visit('/"
  },
  {
    "path": "lib/capybara/spec/session/assert_current_path_spec.rb",
    "chars": 2662,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#assert_current_path' do\n  before do\n    @session.visit('/with"
  },
  {
    "path": "lib/capybara/spec/session/assert_selector_spec.rb",
    "chars": 6221,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#assert_selector' do\n  before do\n    @session.visit('/with_htm"
  },
  {
    "path": "lib/capybara/spec/session/assert_style_spec.rb",
    "chars": 981,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#assert_matches_style', requires: [:css] do\n  it 'should not r"
  },
  {
    "path": "lib/capybara/spec/session/assert_text_spec.rb",
    "chars": 9632,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#assert_text' do\n  it 'should be true if the given text is on "
  },
  {
    "path": "lib/capybara/spec/session/assert_title_spec.rb",
    "chars": 2798,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#assert_title' do\n  before do\n    @session.visit('/with_js')\n "
  },
  {
    "path": "lib/capybara/spec/session/attach_file_spec.rb",
    "chars": 9413,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#attach_file' do\n  let(:test_file_path) { File.expand_path('.."
  },
  {
    "path": "lib/capybara/spec/session/body_spec.rb",
    "chars": 899,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#body' do\n  it 'should return the unmodified page body' do\n   "
  },
  {
    "path": "lib/capybara/spec/session/check_spec.rb",
    "chars": 10148,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#check' do\n  before do\n    @session.visit('/form')\n  end\n\n  de"
  },
  {
    "path": "lib/capybara/spec/session/choose_spec.rb",
    "chars": 4071,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#choose' do\n  before do\n    @session.visit('/form')\n  end\n\n  i"
  },
  {
    "path": "lib/capybara/spec/session/click_button_spec.rb",
    "chars": 17134,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#click_button' do\n  before do\n    @session.visit('/form')\n  en"
  },
  {
    "path": "lib/capybara/spec/session/click_link_or_button_spec.rb",
    "chars": 4301,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#click_link_or_button' do\n  it 'should click on a link' do\n   "
  },
  {
    "path": "lib/capybara/spec/session/click_link_spec.rb",
    "chars": 8121,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#click_link' do\n  before do\n    @session.visit('/with_html')\n "
  },
  {
    "path": "lib/capybara/spec/session/current_scope_spec.rb",
    "chars": 836,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#current_scope' do\n  before do\n    @session.visit('/with_scope"
  },
  {
    "path": "lib/capybara/spec/session/current_url_spec.rb",
    "chars": 3929,
    "preview": "# frozen_string_literal: true\n\nrequire 'capybara/spec/test_app'\n\nCapybara::SpecHelper.spec '#current_url, #current_path,"
  },
  {
    "path": "lib/capybara/spec/session/dismiss_confirm_spec.rb",
    "chars": 1048,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#dismiss_confirm', requires: [:modals] do\n  before do\n    @ses"
  },
  {
    "path": "lib/capybara/spec/session/dismiss_prompt_spec.rb",
    "chars": 548,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#dismiss_prompt', requires: [:modals] do\n  before do\n    @sess"
  },
  {
    "path": "lib/capybara/spec/session/element/assert_match_selector_spec.rb",
    "chars": 1389,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#assert_matches_selector' do\n  before do\n    @session.visit('/"
  },
  {
    "path": "lib/capybara/spec/session/element/match_css_spec.rb",
    "chars": 1099,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#match_css?' do\n  before do\n    @session.visit('/with_html')\n "
  },
  {
    "path": "lib/capybara/spec/session/element/match_xpath_spec.rb",
    "chars": 845,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#match_xpath?' do\n  before do\n    @session.visit('/with_html')"
  },
  {
    "path": "lib/capybara/spec/session/element/matches_selector_spec.rb",
    "chars": 4810,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#match_selector?' do\n  let(:element) { @session.find(:xpath, '"
  },
  {
    "path": "lib/capybara/spec/session/evaluate_async_script_spec.rb",
    "chars": 1122,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#evaluate_async_script', requires: [:js] do\n  it 'should evalu"
  },
  {
    "path": "lib/capybara/spec/session/evaluate_script_spec.rb",
    "chars": 1769,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#evaluate_script', requires: [:js] do\n  it 'should evaluate th"
  },
  {
    "path": "lib/capybara/spec/session/execute_script_spec.rb",
    "chars": 1225,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#execute_script', requires: [:js] do\n  it 'should execute the "
  },
  {
    "path": "lib/capybara/spec/session/fill_in_spec.rb",
    "chars": 10659,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#fill_in' do\n  before do\n    @session.visit('/form')\n  end\n\n  "
  },
  {
    "path": "lib/capybara/spec/session/find_button_spec.rb",
    "chars": 2277,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#find_button' do\n  before do\n    @session.visit('/form')\n  end"
  },
  {
    "path": "lib/capybara/spec/session/find_by_id_spec.rb",
    "chars": 924,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#find_by_id' do\n  before do\n    @session.visit('/with_html')\n "
  },
  {
    "path": "lib/capybara/spec/session/find_field_spec.rb",
    "chars": 4166,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#find_field' do\n  before do\n    @session.visit('/form')\n  end\n"
  },
  {
    "path": "lib/capybara/spec/session/find_link_spec.rb",
    "chars": 2460,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#find_link' do\n  before do\n    @session.visit('/with_html')\n  "
  },
  {
    "path": "lib/capybara/spec/session/find_spec.rb",
    "chars": 21744,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#find' do\n  before do\n    @session.visit('/with_html')\n  end\n\n"
  },
  {
    "path": "lib/capybara/spec/session/first_spec.rb",
    "chars": 5730,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#first' do\n  before do\n    @session.visit('/with_html')\n  end\n"
  },
  {
    "path": "lib/capybara/spec/session/frame/frame_title_spec.rb",
    "chars": 639,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#frame_title', requires: [:frames] do\n  before do\n    @session"
  },
  {
    "path": "lib/capybara/spec/session/frame/frame_url_spec.rb",
    "chars": 607,
    "preview": "# frozen_string_literal: true\n\nCapybara::SpecHelper.spec '#frame_url', requires: [:frames] do\n  before do\n    @session.v"
  }
]

// ... and 142 more files (download for full content)

About this extraction

This page contains the full source code of the teamcapybara/capybara GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 342 files (1.7 MB), approximately 476.0k tokens, and a symbol index with 1728 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!