API overview
Locator
In a nutshell, locators represent a way to find element on a page or within a test element.
Locator | Description |
---|---|
byAttribute(name, value) | Locate element by attribute |
byChecked(checked) | Locate checkbox which is checked, usually it can be chained with checkbox locator |
byCssClass(className) | Locate by CSS class name. Locate by CSS class is not recommended because it is not reliable and can be changed easily. |
byCssSelector(selector) | Locate by CSS selector. |
byDataTestId(dataTestId) | Locate by data-testid attribute. |
byInputType(type) | Locate by input element by its type, such as text, radio, checkbox etc. |
byLinkedElement() | (Experimental) A complex locator where the element is located through matching another known element's attribute value |
byName(name) | Locate by the value of name attribute. |
byRole(role) | Locate by the value of role attribute. |
byTagName(tagName) | Locate by HTML tag name (not recommended). |
byValue(value) | Locate by the value of value attribute |
Component Drivers
Raw HTML components
Package: @atomic-testing/component-driver-html
Driver | Description |
---|---|
HTMLAnchorDriver | Driver for <a> elements |
HTMLButtonDriver | Driver for <button> or any clickable elements |
HTMLCheckboxDriver | Driver for <input type="checkbox"> elements |
HTMLCheckboxGroupDriver | Driver for a group of HTML checkboxes, ideal for multiselection |
HTMLElementDriver | Driver for any HTML element |
HTMLHiddenInputDriver | Driver for <input type="hidden"> elements |
HTMLRadioButtonGroupDriver | Driver for a group of HTML radio buttons |
HTMLSelectDriver | Driver for <select> element, support both single and multiple selection |
HTMLTextInputDriver | Driver for <input type="text"> elements |
HTMLTextAreaDriver | Driver for <textarea> elements |
MUI V5 components
Package: @atomic-testing/component-driver-mui-v5
Test examples can be found in the example folder under component-driver-mui-v5-test package
Driver | Description |
---|---|
AccordionDriver | Driver for Accordion component |
AlertDriver | Driver for Alert component |
AutocompleteDriver | Driver for Autocomplete component (single selection only, multiple selection planned) |
BadgeDriver | Driver for Badge component |
DateRangePickerDriver | Driver for DateRangePicker component |
DesktopDatePickerDriver | Driver for DesktopDatePicker component |
MobileDatePickerDriver | Driver for MobileDatePicker component |
TimePickerDriver | Driver for TimePicker component |
DateTimePickerDriver | Driver for DateTimePicker component |
ButtonDriver | Driver for Button or any clickable component |
CheckboxDriver | Driver for Checkbox component |
ChipDriver | Driver for Chip component |
FabDriver | Driver for Floating Action Button component |
DataGridPro | Driver for DataGrid/DataGridPro component |
DialogDriver | Driver for Dialog component |
MenuDriver | Driver for Menu component |
InputDriver | Driver for Input component and its variants |
RatingDriver | Driver for Rating component |
SelectDriver | Driver for Select component |
SliderDriver | Driver for Slider component |
SnackbarDriver | Driver for Snackbar component |
SwitchDriver | Driver for Switch component |
TextFieldDriver | Driver for TextField component, supports single-line, multiline and selection TextField variants |