Automate right-click action on objects hidden behind runtime window
- Updated: 2024/12/02
Sometimes the objects that you want to automate appear behind the bot runtime window. In such cases, the window is minimized and then reactivated after the action is executed enabling you to successfully automate such objects.
When you perform a right-click action on a browser window, the context menu opens. When you try to click any option in this menu, it disappears because after you execute the right-click action, the active browser window changes to a runtime window. As a result, the context menu closes and the bot fails. To automate such scenarios, perform this procedure.
Procedure
-
Create a window variable.
- In the Name field, enter RuntimeWindow.
- From the Default value field, select the specific application.
-
In the Window title field, enter Bot
running*.
-
Click Create and save the updates.
After saving the updates, the Default value of the variable shows the same name as that of the Window title.
-
Minimize the bot running window.
- From the Actions pane, double-click or drag the Window > Minimize action.
-
In the Window field, select the variable
RuntimeWindow.
-
Automate the right-click action.
- Click Start recording.
- From the Recorder window, select the specific application.
-
Execute the Right click
action on the specific application. For example,
Notepad.
- Select any option from the context menu.
-
Restore the bot running window.
- From the Actions pane, double-click or drag the Window > Restore action.
-
In the Window field, select the variable
RuntimeWindow.