Test Accelerators       Oracle Fusion  |  Oracle EBS  |  Salesforce  |  Workday  |  Trackwise  |  Kronos Accelerator  |  All
 

OpKey Blog

How to handle Popup windows with OpKey?

Radhe Shyam Prajapati 11.11.2016
 
Quite a times in automation we face applications where an end user flow is only completed by saying yes/ no in a pop up window. Most of the open source tools have complex programs; and insufficient documentation available to handle them.
 
Also, we at times encounter situations where an unexpected pop up come and our automation run is hampered by it. The handling of both kinds of expected and unexpected popup windows are available in OpKey and that to with ease.
 
In OpKey Personal Edition, for handling popup which sometime occurs during the execution, we have two system keywords which can be used as per the need.
  • HandleExpectedPopup
  • RecoveryHandlePopup
 
HandleExpectedPopup:
This system keyword has 3 Inputs:
  • WindowTitle: Specify the title of the window which is to be handled.
  • NumberOfTabs: Specify the number of times the Tab key will be pressed and at last Enter key will be pressed.
  • WaitTime:   Specify the duration with in which this system keyword will handle the specified popup.
 
How to Use:
In a test case, we add a step from where we want to activate Popup Handling and select HandleExpectedPopup system keyword.
 
Working:
Execution of the step of the test case which contains the HandleExpectedPopup system keyword will activate popup handling. After that if any popup occurs having same window title as specified in the input value of the system keyword and its waiting time is remaining then that system keyword will press Tab key as per the specified number of times and then it will press an Enter key. After that the execution will continues accordingly.
This system keyword can be used for handling only one popup during the execution.
 
RecoveryHandlePopup:
This system keyword has 2 Inputs:
  • WindowTitle: Specify the title of the window which is to be handled.
  • NumberofTabs: Specify the number of times the Tab key will be pressed and at last Enter key will be pressed.
 
How to Use:
In a test case, we add a step from where we want to activate Popup Handling and select RecoveryHandlePopup system keyword.
 
Working:
Execution of the step of the test case which contains the RecoveryHandlePopup system keyword will activate popup handling. After that if any popup occurs during the complete execution of the test suite having same window title as specified in the input value of the system keyword that system keyword will press Tab key as per the specified number of times and then it will press an Enter key. After that the execution will continues accordingly.
 
This system keyword can be used for handling all popup with specified window title during the complete execution of the test suite.
 
How to implement this Scenario in OpKey:
  • Create a test case having HandleExpectedPopup System keyword and RecoveryHandlePopup System keyword for handling popup as shown below:

 

20

Specify the Input Values of these steps of the test case

 

21

 

22

  • When these steps will execute then while login in yahoo mail account a message will occur. This popup will be handled by the HandleExpectedPopup System keyword because its window title is same as specified in the input values. Then the user will continue with their proceedings.
  • Each time Mozilla Firefox opens, it asks for making the browser as default browser if it is already not set, then to handle these kinds of message boxes we can use RecoveryPopupHandle System keyword because it will handle popup in the complete execution.

 

23

  • Further the normal execution will continues.

Recent Posts

This site use Cookies to deliver our Service. By using this site you acknowledge that you have read and accepted Our Privacy and Cookie Policy. Your interest in OpKey or use of its free trial or purchase of a subscription package is subject to these Terms and Policies