▶️ You can find a tutorial on how to manage windows on our Youtube channel.
The window management action allows you to manage the Windows operating system, Windows desktop modal applications and browser tabs.
It does not allow to manage internal windows of some Web applications, which are floating HTML elements, directly accessible with the Web automations.
A specific menu is also available to manage dialog boxes without adding unnecessary complexity.
In other words, the window action does not only concern various windows but also tabs on the same page and pop-ups.
When an application opens a window, Agilitest cannot determine whether the capture should take place on that window or whether it should remain on the current window. This depends on how the application designers intended to do it, whether the window is modal, non-modal, etc.
To access the window action options, click on the "Window" button in the action menu
The window action has a sub-menu with three possible actions:
- Size and location: This moves the window by specifying its new Cartesian coordinates or change its size (height and width)
- Window visual state: This allows you to send an event from the operating system about the current window
- Switch window: This changes the current window by indicating the number of the window to be changed
Size and location
This action allows you to move the window by specifying its new Cartesian coordinates, or to change its size: height and width.
Simply activate the parameters you wish to change by clicking on the yellow stars, then enter the desired values.
This action will affect the current window.
Window visual state
This action will allow you to send an operating system event to the current window.
It works in the same way as if you had clicked on one of the icons of your application (top right for Windows).
The possible actions are as follows:
- Close: To close the current window
- Maximize: To enlarge the current window to the maximum
- Reduce: To reduce the window
Switch window
When there is only one window in the application, all actions performed are sent to this window. When an application has several windows, a current window must be defined.
This is similar to the current channel: all actions performed are sent to the current window.
This switch window action can be applied for different windows of a channel as well as different tabs from a window.
Index
This function allows you to change the current window by indicating the number of the window concerned.
The number 0 corresponds to the application's main window, and the following numbers are in the order of appearance of windows (or tabs in a browser).
Example:
You have a channel with 7 windows.
The first window is index 0.
The 2nd window is index 1.
The 3rd window is index 2.
Etc…
Name
To switch window with a name, you need to enter a name that is displayed in the tab you wish to switch to.
Example:
If you want to switch to the “Cat - Wikipedia” tab, you can enter “cat” in the name field.
🔸Warning
If the word you enter appears several times in several tabs/windows, the editor will use the one that appears first.
URL
To switch window with an URL, you can enter the URL from window/tab you want.
Problematic interventions
All these actions will allow you to precisely influence the configuration of your application's windows.
In some cases, this can cause problems:
Forced positioning
If you always place your application windows in the same position, you may not see any bugs, in which case we recommend letting the applications use the screen space as they wish, and possibly testing on different screen sizes.
Obviously, in some cases, it is useful to force a specific configuration, if you use graphical recognition for example, because contrary to an approach related to the application structure (DOM, Desktop), graphical recognition will act on the elements actually visible on the screen.
Direct intervention on the application
Closing the current window gets rid of a cluttered pop-up window.
But we do not recommend closing the main application window (unless you want to control an alert window).
To do this properly in Agilitest, use the action to close the channel.