get popup message

Retrieve the messages of one or more recent confirmation, prompt, or alert popups.
NameDescriptionTypeModifier

variable,

variable2,

variable3,…,

variableN

(Optional) Names of one or more variables to receive the returned messages displayed in corresponding popups (See ).

StringNone
The messages of one or more recent confirmation, prompt, or alert popups.
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 shopping cart page with a button Delete this item, for removing an item from your cart:

  1. Upon clicking the button, a confirmation popup appears with the message "Do you want to delete this item?". Two buttons, OK and Cancel, are displayed.
  2. In the popup, the OK button is clicked.
  3. The test then retrieves the message of the confirmation popup.

        
        	button	
click on next popup	OK	
&nbsp		
	window	control
click	home	delete this item
&nbsp		
	variable	
get popup message	>>msg confirmation	
&nbsp		
clear popup queue		
        
    
Example - Case 2: A sequence of multiple popups

Scenario: You are testing a shopping cart page with a button, Delete this item, for removing an item from your cart:

  1. Upon clicking the button, a confirmation popup appears with the message "Do you want to delete this item?". Two buttons, OK and Cancel, are displayed.
  2. In the popup, the OK button is clicked.
  3. This triggers an alert popup with the message Item deleted, and a single OK button.
  4. The test clicks OK in the alert to dismiss it and proceed.
  5. The test then retrieves the following messages in three separate action lines:
    • The message of the most recently handled popup (the alert popup).
    • The message of the second most recently handled popup (the confirmation popup).
    • The messages of both popups.

        
        	button	
click on next popup	OK	
click on next popup	OK	
&nbsp		
	window	control
click	home	delete this item
&nbsp		
	variable	
get popup message	>>msg alert	
&nbsp		
	variable2	
get popup message	>>msg confirmation	
&nbsp		
	variable	variable2
get popup message	>>msg alert popup	>>msg confirmation popup
&nbsp		
clear popup queue		
        
    
  • variable argument:
    • For convenience, the argument headers variable, variable0 and variable1 are all used to reference the same item (that is, the message text of the most recently handled popup).
    • Each variable argument is numbered in accordance with the order of handled popups in the current popup session, in reverse chronological order. Specifically, variable specifies the most recently handled popup, variable2 the second most recent, and so on.
    • A single call to this action may be used to retrieve any or all of the handled popup messages of the current popup session. Specify as many variable arguments as there are messages you wish to retrieve, taking care to number them (variable2, variable5, etc.) in correspondence with the popups (See above).
    • If the variables in arguments variable, variable2, variable3, etc have not been declared, the action creates them as globals.
  • 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