UiPath Documentation
activities
latest
false

UI Automation activities

Identifying Oracle Redwood elements

Oracle Redwood pages render UI through Oracle JET (Oracle JavaScript Extension Toolkit) custom elements. Selectors generated for these elements are easy to recognize by the oj- prefix on the tag attribute and by the framework-specific attributes described below.

A selector for an Oracle Redwood element contains the <webctrl> tag, similar to other web UI elements.

The following attributes are surfaced in selectors for Oracle Redwood elements:

AttributeDescription
tagThe JET custom element tag (for example, oj-button, oj-input-text, oj-table, oj-list-view). Helps to disambiguate JET components from plain HTML elements.
redwood-idStable identifier derived from JET's :id binding expression. JET often regenerates random id values on refresh while the :id expression does not, so prefer redwood-id when available.
data-keyKey that JET stamps on data-bound or dynamic containers, such as dashboard cards or grouped-table headers, set to the bound item's key. Not present on ordinary rows; the selector anchors the nearest ancestor that carries data-key.
data-oj-fieldName of the bound field, stamped by JET on a parent element of form fields. Surfaced on the enclosing ancestor, keeping the selector stable when the field's internals re-render.

The id attribute of Oracle Redwood elements is included in selectors only when its value is reliable. JET auto-generates many id values that change between page loads or sessions; the driver recognizes these and leaves them out of the selector. When the id is filtered, the driver falls back to redwood-id and the surrounding JET component's stable identifier. The redwood-id value also provides the element's display name in Studio when the element has no better name.

The driver can also add a class attribute holding the JET role class of the indicated element (for example, class='*oj-button-text*' for the text part inside an oj-button). JET composites paint these role classes onto their inner parts, which makes them a stable way to address a part when the part itself has no id.

Examples

redwood-id vs id. JET regenerates an element's id on every render, for example a message banner whose id cycles through _oj45_bannerunsaved, _oj112_bannerunsaved, … as the _ojNNN counter advances. The driver filters that volatile id and uses the stable redwood-id (derived from the component's :id binding) instead:

<webctrl tag='OJ-MESSAGE-BANNER' redwood-id='uidbannerunsaved' />
<webctrl tag='OJ-MESSAGE-BANNER' redwood-id='uidbannerunsaved' />

data-key + role class (a dashboard metric). Each dashboard card is a data-bound container JET stamps with data-key, so the selector anchors the card by its key; the value element inside it is pinned by its JET role class:

<webctrl tag='DIV' data-key='accounts' />
<webctrl tag='DIV' class='*oj-sp-scoreboard-metric-card-metric*' />
<webctrl tag='DIV' data-key='accounts' />
<webctrl tag='DIV' class='*oj-sp-scoreboard-metric-card-metric*' />

data-oj-field (a form field). In an edit/create form, JET stamps the bound field name on the field component, which the driver uses to anchor the field regardless of its internal id churn:

<webctrl tag='OJ-COMBOBOX-ONE' data-oj-field='OrganizationName' />
<webctrl tag='OJ-COMBOBOX-ONE' data-oj-field='OrganizationName' />

A CX picker field. The picker's oj-vb-fragment gets a runtime id of the form {fieldName}-cx-{uid}, where the suffix is regenerated every session. The driver recovers the stable field name and anchors the fragment with a wildcard id:

<webctrl tag='OJ-VB-FRAGMENT' id='PrimaryContactPartyId-cx-*' />
<webctrl tag='INPUT' type='text' />
<webctrl tag='OJ-VB-FRAGMENT' id='PrimaryContactPartyId-cx-*' />
<webctrl tag='INPUT' type='text' />

Tip:

The project's Selector - Default find type should be One match so ambiguous selectors fail at authoring time rather than at runtime — see About Oracle Redwood automation.

  • Examples

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated