if

Begin a block of action lines which are executed only if a specified condition is satisfied.
NameDescriptionTypeModifier
condition

Expression that evaluates to a Boolean True or False.

StringNone
None
This action may be used within the following project items: test modules and user-defined actions.
The following settings are applicable to this action: remove double quotes from cells.
                                
                                    	format	hour	minute	second	am/pm
get system time	24	h	m	s	&nbsp
	&nbsp				
	condition				
if	#h<12				
	&nbsp				
	text				
report	Good morning				
	&nbsp				
	condition				
else if	#h>12 and h <18				
	&nbsp				
	text				
report	Good aftermoon				
	&nbsp				
else					
	text				
report	Good evening				
	&nbsp				
	text				
report	Good evening				
	&nbsp				
end if					
                                
                            
  • If condition evaluates to True, the succeeding block of action lines up until the first occurrence of an else, else if, or end if, is executed. If False, that block is skipped.

  • This action ignores letter case for values of True and False, and is unaffected by the current state of the case sensitive built-in setting.

  • It is acceptable to use numeric expressions in the condition argument. TestArchitect treats the value 0 as False, and 1 as True. Note that an error is generated for any other numeric value.

  • The following operators may be used within an expression in the condition argument:


    Table 1. Comparison operators

    PrecedenceComparison operatorMeaning
    4=equal to
    4<>not equal to
    4>greater than
    4>=greater than or equal to
    4<less than
    4<=less than or equal to


    Table 2. Logical operators

    PrecedenceLogical operatorMeaning
    5notValue is TRUE if its operand is FALSE.
    6andValue is TRUE if and only if both sides of the and operator are TRUE.
    7orValue is TRUE if either side of the or operator is TRUE.


    Notes: 
    For the full list of operator precedence, see here.


Copyright © 2023 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(800) 322-0333