Operation"

From Documentation
m (correct highlight (via JWB))
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{ZATSEssentialsPageHeader}}
 
{{ZATSEssentialsPageHeader}}
  
ZATS Mimic can simulate various user actions to an application. It is a fundamental 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 <tt> OperationAgent </tt> on a <tt> ComponentAgent </tt>:
+
Steps to use a <code> OperationAgent </code> on a <code> ComponentAgent </code>:
# Retrieve a target ComponentAgent with selector syntax
+
# Retrieve a target <code>ComponentAgent</code> with the selector syntax
# Depends on what operation you want to mimic, call <tt> ComponentAgent.as(OperationAgent.class) </tt> to convert it as an <tt> OperationAgent </tt>.
+
# 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.
+
#: 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.
  
Line 19: Line 19:
  
  
 +
{{ZATSEssentialsPageHeader}}
 
{{ZATSEssentialsHeadingToc}}
 
{{ZATSEssentialsHeadingToc}}
 
{{ZATSEssentialsPageFooter}}
 
{{ZATSEssentialsPageFooter}}

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 :

  1. Retrieve a target ComponentAgent with the selector syntax
  2. 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.






Last Update : 2022/01/18

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.