- Add
:roleselector to find elements by their implicit or explicit aria role - Add
:test_idselector - Added an
accessible_descriptionNodemethod and a selector filter - The accessible description calculation now supports
aria-descriptionand will more correctly handle hidden text - Deprecated the
described_byfilter in favour ofaccessible_name. This is now a synonym ofaccessible_descriptionand will create warning. - The rack_test driver now fully supports the accessible name calculations
- The rack_test driver now fully supports resolving accessible roles
- The
ariafilter will now filter for not having the attribute if the hash value isnil
- Extend
Capybara::Node::Simplewith theroleattribute to support the:rolefilter [Sean Doyle] :main,:bannerand:contentinfoselectors no longer requires the element to be a direct child of<body>:bannerand:contentinfoselectors use rules from ARIA in HTML for implicit matching:main,:banner,:contentinfo, and:navigationare now implemented asdescendant_or_self
- Remove ruby 3.1 support. Minimum supported Ruby version is now 3.2
- Fix xpath query timeout errors when using the disclosure selector with pages with a large number of id attributes
- Improve how the
select_combo_box_optionwaits for the option to show
accessible_namemethod to Node (Selenium only)accessible_namefilter (Selenium only)rolemethod to Node- A selenium driver will use the browser's computed role
- Rack test will only return the value of the role attribute
- (potentially breaking) the
rolefilter now uses the browser's resolved accessible role (Selenium only) and will return "none" and "presentation" asnil - Passing an empty string to
select_combo_box_optionwill clear the combo-box select_combo_box_optiontakes a block which can be used to filter the found options- Added the
ariafilter to all selectors that didn't have it
- Removed support for Ruby 3.0. Minimum supported Ruby version is now 3.1
:imgselector and matcher [Phillip Kessels]:dialogselector and matcher:headingselector and matcherariafilter to:combo_box,:disclosure, and:disclosure_button[Sean Doyle]
:regionselector was finding<section>elements without an accessible name:sectionselector was matching sections with no headings resulting in ambiguous matcher errors
- All filters will now validate their inputs more strictly
described_byandvalidation_errorfilters will also accept a regular expression- The
:modalselector will now check a native modal is displaying as a modal :sectionselector will also match aria headingsvalidation_errorfilter- now checks for
validity.validor thearia-invalid=trueattribute Previously it requiredaria-invalid=trueattribute - now allows the error message to be in the
aria-labelledbyname - now also takes a boolean allowing you to check if a field is or isn't invalid
- now checks for
have_validation_errors:- allows use of
withinandwithin_fieldsetwithin the block - allows you to use
radio_groupto match multiple radios by a fieldset legend - added some missing selectors
- corrected logic for finding invalid fields
- allows use of
- The
currentfilter will now acceptnilto match having noaria-current[Sean Doyle] - Change
:rich_textto support both[contenteditable="true"]and[contenteditable=""][Sean Doyle]
- Removed support for Ruby 2.7. Minimum supported Ruby version is now 3.0
- Added a
requiredfilter to all form input selectors - The
described_byfilter is now available on all selectors - Fix an issue with filling in a iframe rich text and the Gecko driver
- Add
role:filter [Sean Doyle] - Add
aria:Hash filter [Sean Doyle] - Add
:articleselector andhave_articlematcher [Sean Doyle] - Add
:grid,:gridcell,:columnheader, and:row[Sean Doyle] - Add
:menuand:menuitemselector [Sean Doyle] - Add
current:filter for:linkand:link_or_buttonselectors [Sean Doyle] - Add
:banner,:contentinfo,:main,:navigationand:regionselectors [Sean Doyle] - Removed
focused:in favour of the "native" capybara focus - Allow the
:modalselector to select open<dialog>elements - Added a
select_disclosuremethod, that will open a disclosure and run a block within it. - Fix
fill_in_rich_textcan enter an infinite loop when clearing
- Focus rich text when editing it
- Remove old fix for Chrome driver bug
- Add an optional block to
select_tab - Fix documentation for
select_tab
- Fix incompatibility with Ruby < 3.1
- When passed a block,
toggle_disclosurewill forward the block to awithin_disclosurecall with the same set of locator arguments and options - Add
item_typeselector typeselector now uses css and works on a space separated items
- Fix selecting a modal or rich text by aria-label was using the exact text
- Support the
extactoption for selecting a modal or rich text - add
focusedfilter todisclosure_buttonandmodal
- Fix Ruby 3 errors
- Filter
list_box_optionnodes based on whether or notaria-selected="true"
- Fixes Ruby 2.7 warnings when passing options
- Combo box option matching now uses normalised white-space
- Fix
select_combo_box_optionshould click on a td when the option is a tr - Add modal to cheat sheet
- Added additional selector options to combo box
select_combo_box_optionwill not longer try to select a disabled option- Added cheat sheet
- Fix rich text areas not clearing when filled in Chrome driver bug
- Added option to not clear the rich text area
- added
searchoption toselect_combo_box_option - added find options for the option element to
select_combo_box_option