"DESKTOP_SHUTDOWN" Command

Description: This command is used to enter the names of the applications as seen on Task Manager > Details (without .exe). Once execution is finished, stopping the test case will close the applications.

Usage Scenario: Suppose we have a test case that creates folders/files and once finished, Windows Explorer must be closed after the test case is stopped/finished.

Procedure: Create the steps necessary to create the folder/files. After that, create a step with Desktop_Shutdown command where the Process name will be “explorer”. Here’s a sample image of how you can identify the process name from Task Manager. You can enter any similar names but you must not include the extension (.exe) in the Process field in the command.

Your step will look like this:

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

The following video demonstrates how these steps get executed: