About Open UI Automation
Open UI Automation (OUIA) is a specification of certain key guidelines to follow when creating a new web framework or application. The goal is to ease the burden of creating and maintaining automated testing environments. OUIA standardizes some HTML attributes and web page behavior. It helps to create trivial and unambiguous locators of the elements in the DOM for various automated test suites.
id
or ARIA
?
Why not use ARIA
is designed as an accessibility specification, and it doesn't account for aspects that are crucial
for automation such as a component type. The id
attribute might be reserved by some front-end code, and
there might be restrictions on changing it. Having a separate id attribute makes it application and
framework independent. Developers and testers have a contract that these attributes are designed for
UI automation.
Specification parts
The following blocks exist in the specification:
OUIA:Component
- components and component frameworksOUIA:Page
- page identificationOUIA:PageSafe
- interaction safety
You can find the complete description on the OUIA website.
Usage
PatternFly 4 generates a data-ouia-component-type
attribute for selected components automatically
based on the name. For example, the data-ouia-component-type
attribute for the
button component is PF4/Button
. The id of the data-ouia-component-id
attribute is random by default. To specify the concrete id, add an ouiaId
prop to the
component.
OUIA-compliant PatternFly 4 components
react-core package
- Alert
- Breadcrumb
- Button
- Card
- Checkbox
- Chip
- ChipGroup
- ContextSelector
- Dropdown
- DropdownItem
- DropdownSeparator
- DropdownToggle
- DropdownToggleCheckbox
- FormSelect
- Menu
- Modal
- ModalContent
- Nav
- NavExpandable
- NavItem
- OptionsMenu
- Pagination
- Radio
- Select
- Switch
- TabButton
- TabContent
- Tabs
- Text
- TextInput
- Title
- Toolbar
react-table package
View source on GitHub