Introduction
In Red Hat Management QE team we dedicate a lot of time to Web UI testing. As you might know Selenium is a common solution to automate browser actions. We created several abstractions around it to speed up tests development. But we think that it’s not enough. We would like to propose a specification of guidelines to follow when creating a new web framework or application.
OUIA
The goal is to ease the burden of individuals wishing to create and maintain automated testing environments.
The OUIA is composed of multiple sections. In this forum topic I would like to discuss guidelines for patternfly components such as Dropdown, Table, Alert and so on. In our terminology they are widgets, but let’s not focus on terminology and let me provide the key concept of OUIA:Widget
OUIA:Widget
This part is designed to cover widgets in use on pages. Widgets that are OUIA:Widget compliant
MUST have the following properties.
-
A root level HTML element with a
data-ouia-widget-type
attribute describing a unique name
identifying ALL HTML widgets that can be controlled with the same code or interactions.- e.g. A page that has a special dropdown, could choose to name that dropdown as
CustomDropdown
.
All instances of thisCustomDropdown
widget MUST be expected to be able to be controlled
via the same automation.
- e.g. A page that has a special dropdown, could choose to name that dropdown as
-
An id attribute called
data-ouia-widget-id
which is OPTIONAL if there will only be
one instance of the widget on the page at once. Anyid
on the page MUST be unique
even if it is used by different widget.- e.g. A vertical navigation can be expected to only be instantiated once on a page, as such
it does not need any other identifying factors. Another widget type, like a button, would be
created multiple times on a page and requires some kind of value as a unique identifying id.
- e.g. A vertical navigation can be expected to only be instantiated once on a page, as such
-
An attribute called
data-ouia-safe
which is True only when the widget is in a static state,
i.e. no animations are occurring. At all other times, this value MUST be False.
We really would like to see it Patternfly and opened to any discussion about this proposal.