Examples by Element
This section contains descriptions of different UI elements that can be interacted with using Java App Steps. Each element section specifies the element type, supported attributes, pseudo elements, and example usage.
Button
A button performs an action when interacted with. It may contain text, an icon, or both.
CSS selector details
Element type: button
Attributes:
- text
- toolTipText
Examples
# Click the button whose visible text is 'Submit'
And I click object "cssSelector:button[text = 'Submit']" in java app
# Verify that the button whose visible text contains 'Confirm' is visible in the app
And I see object "cssSelector:button[text *= 'Confirm']" in java app within 3 seconds
# Some buttons may have an Icon instead of text.
# You can find them using their tooltip text
And I click object "cssSelector:button[toolTipText = 'Copy to Clipboard']" in java app
Checkbox
A checkbox is a control which represents an on/off or selected/not selected value.