control condition

Waits for given TA properties of controls to satisfy specified conditions before UI-interactive actions are executed.

The default unit of the setting is dynamic identifier expression that evaluates to a Boolean True or False.

Suppose that you'd like to test a flight booking web page with the following steps:

  1. Click control departure, an input-text, to select a departure date.
  2. Once the departure date is selected, the page enables control arrival, also an-input text, after a certain amount of time.
  3. Subsequently, click arrival to select an arrival date.
Normally, the test procedure you declare may not handle the timing issue when the arrival control is enabled after an amount of time. Consequently, during automation playback, there is a possibility that, although the arrival control is not yet enabled and visible, UI-interactive actions still interact with that control, which might cause the automation to fail.
Let's define the readiness state of input-text controls (visible=true, enabled=true) by using control condition, along with the wait time by using control condition wait.


        
        	setting	value	
setting	control condition wait	7	
setting	control condition	[ta class=input-text, visible=true, enable=true]	
&nbsp			
	setting	value	
setting	use browser	Internet Explorer	
&nbsp			
	location	window	handle
navigate	http://vietjetair.com/		
&nbsp			
	window	control	click type
click	home	departure	left
click	home	arrival	left
        
    
  • This built-in setting only takes effect on UI-interactive actions, such as, enter, select, click and type.
  • The definition of readiness of a TA property is based on your preferences. Particularly, a TA property is ready when it satisfies all conditions, defined in the control condition setting, before UI-interactive actions are executed.
  • To define lists of conditionals to be met for each type of control, use dynamic identifier format (Learn more).
  • To wait for all types of controls, you have either of two options:
    • No TA class is required. For example, for all types of controls, wait until visible=true and enable=true conditions are satisfied.
                          
                          	setting	value
      setting	control condition	[visible=true, enable=true]
                          
                      
    • Declare ta class={.*}. For example, for all types of controls, wait until visible=true and enable=true conditions are satisfied.
                          
                          	setting	value
      setting	control condition	[ta class={.*}, visible=true, enable=true]
                          
                      
  • To specify multiple types of controls at a time, separate each set of TA class with a comma. For example:
    • For textbox, wait until visible=true, enable=true, and editable=true conditions are satisfied. Additionally, for button, wait until visible=true and enable=true conditions are met.
                          
                          	setting	value
      setting	control condition	[ta class=textbox, visible=true, enabled=true, editable=true],[ta class=button, visible=true, enable=true]
                          
                      
    • For all types of controls, wait until visible=true and enable=true conditions are satisfied. However, for textbox only, wait until visible=true, enable=true, and editable=true conditions are met.
                          
                          	setting	value
      setting	control condition	[ta class={.*}, visible=true, enabled=true],[ta class=textbox, visible=true, enable=true, editable=true]
                          
                      
  • When one of the defined TA properties is invalid or does not exist, the control condition setting is ignored.
  • You can quickly obtain the dynamic identifier of given UI controls by using Copy Definition from the Interface Viewer or the point-to-identify tool.
  • The timeout value waiting for TA properties until all defined conditions are met is specified in the control conditional wait built-in setting.

Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400