Operation"
From Documentation
m (correct highlight (via JWB)) |
|||
Line 3: | Line 3: | ||
ZATS Mimic can simulate various user actions to a component such as input or click. It is a major part when writing a test case with ZATS Mimic. | ZATS Mimic can simulate various user actions to a component such as input or click. It is a major part when writing a test case with ZATS Mimic. | ||
− | Steps to use a < | + | Steps to use a <code> OperationAgent </code> on a <code> ComponentAgent </code>: |
− | # Retrieve a target < | + | # Retrieve a target <code>ComponentAgent</code> with the selector syntax |
− | # Depends on what operation you want to mimic, convert to the corresponding < | + | # Depends on what operation you want to mimic, convert to the corresponding <code>OperationAgent</code>, e.g. <code>ComponentAgent.as(SelectAgent.class)</code> to select an Listitem. |
#: Notice that not all ComponentAgents support all OperationAgent. e.g. you can't select a Button. | #: Notice that not all ComponentAgents support all OperationAgent. e.g. you can't select a Button. | ||
#: If conversion fails, you will get a run-time exception. | #: If conversion fails, you will get a run-time exception. |
Latest revision as of 02:55, 18 January 2022
ZATS Mimic can simulate various user actions to a component such as input or click. It is a major part when writing a test case with ZATS Mimic.
Steps to use a OperationAgent
on a ComponentAgent
:
- Retrieve a target
ComponentAgent
with the selector syntax - Depends on what operation you want to mimic, convert to the corresponding
OperationAgent
, e.g.ComponentAgent.as(SelectAgent.class)
to select an Listitem.- Notice that not all ComponentAgents support all OperationAgent. e.g. you can't select a Button.
- If conversion fails, you will get a run-time exception.