# Version 3.0.0 Release date: unreleased ### Added * Ruby 2.2+ required * RSpec 2.x no longer supported * Deprecated methods removed * `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. ### Removed * `Capybara.exact_options` no longer exists. Just use `exact:true` on relevant actions/finders if necessary. # 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 qutting 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 `