class TestOutputElement
A class that represents a rendered output element.
class TestOutputElement
Constructor
- constructor(type)Creates a new output element with the provided type.
Type Members
- type TestOutputElement.TypeString staticA string representation of common UI element types, used for TestOutputElement.type.
- type TestOutputElement.PlatformEvent staticType definition for a set of platform event names.
Instance Members
- uid readonlyA unique ID for this element, which can be used to check for unnecessary re-rendering.
- type readonlyThe component type that rendered this output element, one of TypeString values.
- parentThe parent element, if any, as rendered by a container UI component.
- outputA reference back to the rendered output object.
- disabledTrue if input has been disabled for a control element.
- readOnlyTrue if text input has been marked as readonly.
- pressedTrue if a button is visibly selected (pressed).
- valueThe content of a text field input element.
- checkedThe checked state of a toggle element.
- textThe rendered text content of an element: label text, button label, or placeholder.
- iconA string representation of the icon as rendered for labels and buttons.
- chevronThe chevron direction (string) for button elements.
- imageUrlThe URL for an image element.
- accessibleRoleThe WAI-ARIA role for this element, if any.
- accessibleLabelThe WAI-ARIA label text for this element, if any.
- focusableTrue if this element can be focused on click, or call to focus().
- hasFocus()Returns true if this element currently has input focus.
- stylesA combination of all style overrides applied to this element.
- styleClassA base style class that is applied to this element.
- contentA list of all nested content elements, for containers.
- click()Simulates a user click or tap event.
- setValue(text)Simulates text input on a text field element.
- focus()Sets input focus on this element.
- blur()Removes input focus from this element.
- sendPlatformEventHandles the specified (simulated) platform event.
- isOutput()Returns true if the element is currently included in the render tree, and would be part of the on-screen output.
- remove()Removes this element from its parent element, if any.
- matchStyleValues(styles)Checks if given styles match with the current styles object.
- querySelectFirst(f)Returns the first (nested) element for which the provided callback returns true.
- querySelect(f)Returns all (nested) elements for which the provided callback returns true.
- toJSON()Returns a simplified object representation of this element and its contained elements.