How to Handle Popup Windows With Opkey?

How to Handle Popup Windows With Opkey?

November 11, 2016

/Iffat Ara Khanam/

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 pop-up windows are available in Opkey and that too with ease. In Opkey Personal Edition, for handling popup which sometimes occurs during the execution, we have two system keywords that can be used as per the need.

HandleExpectedPopup: This system keyword has 3 Inputs:

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 the 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 the Tab key as per the specified number of times and then it will press an Enter key. After that, the execution will continue accordingly. This system keyword can be used for handling only one popup during the execution.

RecoveryHandlePopup: This system keyword has 2 Inputs:

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 the same window title as specified in the input value of the system keyword that system keyword will press the Tab key as per the specified number of times and then it will press an Enter key. After that, the execution will continue accordingly. This system keyword can be used for handling all popups with specified window title during the complete execution of the test suite.

How to implement this Scenario in Opkey:

Specify the Input Values of these steps of the test case

Iffat Ara Khanam

Technical Content Lead

Iffat is the content lead at Opkey. She has expertise in writing technical content focused around ERP testing, Cloud apps, automation and other IT related topics. She has rich experience in writing content for marketing collateral like whitepapers, case studies, newsletters etc. which helps in funnel creation for sales.