LEAPWORK offers an efficient and easy way to handle pop-up windows while automating web applications. As LEAPWORK always operates on the active window and in case a pop-up window appears we need to change focus of our active window to that particular pop-up window.
This can be achieved in different ways depending on the type of pop-up window.
As a rule, there are 3 major types of pop-up windows:
- New Web browser window/New Tab Opened
- Windows-based alert pop-ups
- Web-based alert pop-ups
New Web browser window/New Tab Opened
Multiple browser windows can be easily handled in LEAPWORK by "Use Browser Window" building block. It is used to switch focus to a specific web browser window when working with web automation.
This would work in case of a new web browser window opened or if we have a new tab opened up.
You can refer to this video for detailed explanation.
Windows-based alert pop-ups
Handling windows based pop-ups is beyond Selenium WebDriver’s capabilities, and LEAPWORK is based on its underlying technology. Thus to handle this we need to change our Case type to Desktop UI.
As Desktop UI is the super set of all case types, after changing this we would still be able to use all the existing functionality of Web, in addition to Desktop UI and Virtual desktop (Image and Text recognition) functionality.
Follow the below steps:
- Change case type from Web application to Desktop UI present under Settings tab
- You can use Click Image building block from Mouse and Keyboard section to click on pop-up window buttons or you can use "Use UI Window" building block of Desktop UI. You can click here for reference. You can also use a combination of both.
Note: With such setup the test case can only be run via Agent.
Web based alert pop-ups
You can handle web based alert pop-ups using "Handle Web Alert" building block.
The building block will automatically capture any alert and you can specify the action the building block should take. You can find videos explaining this is detail here.
For any clarification, please contact our Priority Support.
Comments
0 comments
Please sign in to leave a comment.