check popup default text

Check the default text of the user-entry fields of one or more prompt popups against their respective expected values.
NameDescriptionTypeModifier
message

Identifying message text of prompt popup(s)

StringNone

expected,

expected2,

expected3,…,

expectedN

(Optional) Expected values of the default texts displayed in the specified prompt popups

(See ).

StringNone
Result is Passed if all values match, otherwise Failed.
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, standard ASCII only.
Example - Case 1: A single popup

Scenario: You are testing a customer information page with a button, Sign up, used for submitting one's name:

  1. Upon clicking the button, a prompt appears with one input field and two buttons: OK and Cancel.
    Notes: 
    The prompt popup displays the fields:
    • Message: Please enter your name
    • Default text: Joe Doe
  2. The test enters a new input value, e.g. Jane Doe, and then clicks OK to proceed.
  3. The test then verifies the default text of the prompt popup based on a given message.

        
        	text	
enter text on next popup	Jane Doe	
&nbsp		
	window	control
click	home	sign up
&nbsp		
	expected	
check popup message	Please enter your name	
&nbsp		
	message	expected
check popup default text	Please enter your name	Joe Doe
&nbsp		
clear popup queue		
        
    
Example - Case 2: A sequence of multiple popups

Scenario: You are testing an email registration page, with a button, Sign up, used for submitting a new email address:

  1. Upon clicking the button, a prompt popup appears with one input field and two buttons: OK and Cancel.
    Notes: 
    This first prompt popup displays the following:
  2. An invalid email address is entered (e.g. Doe), and then OK is clicked to proceed.
  3. An alert popup is triggered to notify user of the invalid email address. It has one button, OK.
  4. The test clicks OK in the alert to dismiss it and proceed.
  5. An additional prompt popup appears emphasizing the need for a valid email address.
    Notes: 
    This second prompt popup displays:
  6. A valid email address, e.g. [email protected], is now entered, and OK clicked.
  7. The test then verifies the following default texts:
    • The default text of the prompt popup whose message is Please enter a valid email.
    • The default text of the prompt popup whose message is Please enter your email address. (Hint: We can verify both default texts in a single action call by specifying prompts whose messages begin with the string Please enter)

        
        	text		
enter text on next popup	Doe		
&nbsp			
	button		
click on next popup	OK		
&nbsp			
	text		
enter text on next popup	[email protected]		
&nbsp			
	window	control	
click	home	sign up	
&nbsp			
	message	expected	
check popup default text	Please enter a valid email	[email protected]	
&nbsp			
	message	expected	
check popup default text	Please enter your email address	[email protected]	
&nbsp			
	message	expected	expected2
check popup default text	{Please enter.*}	[email protected]	[email protected]
&nbsp			
clear popup queue			
        
    
  • Prior to using this built-in action, it is recommended that you become familiar with the different kinds of modal JavaScript popups and how to handle them properly.
  • message argument:
    • If no value is provided in this argument, any prompt without a message is considered a match.
    • For added flexibility, wildcards may be used in this argument. For example: given a message argument with value of \{Please reenter your.\*\}, TestArchitect searches for prompt popups whose message beginnings match the string Please reenter your. (See above)
      Tip: 
      In more general terms, this argument accepts regular expressions.
  • expected argument:
    • For convenience, the argument headers expected, expected0 and expected1 are all used to reference the same item (that is, the default text of the most recent matching prompt popup).
    • Numbers appended to the expected arguments reference only prompts in the recent popup history that have messages matching the contents of the message argument. Any other prompts, for the purposes of the current action, are ignored. The numbers correspond to the reverse order in which those popups were handled. Hence, expected references the most recently handled prompt popup satisfying the message text, expected2 the second most recent, and so on.
    • In cases where multiple prompts satisfy the contents of message, a single call to this action can be used to check any or all of the respective default text strings. Specify as many expected arguments as there are texts you wish to verify, taking care to number them in correspondence with the specific matching prompts (See ). Note that this check action reports a PASSED result only if every one of the specified expected arguments matches the default text of its corresponding prompt.
    • If you want to verify a default text of a single specific prompt popup, replace expected with your desire expectedN, for example, expected2. (See .)
  • This action supports the <ignore> modifier. If the string <ignore> is present as the value of any of the arguments, or any argument contains an expression that evaluates to <ignore>, the action is skipped during execution.

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