How can I launch an application on the SUT?

It isn’t possible to launch an application on the system under test (SUT) using a single command.

However, it’s relatively easy to create a handler that can be run to perform this task whenever you need to. Examples of how to do this on both Windows and Mac are below.

Windows

To launch an application on a Windows SUT:

on OpenApp appToLaunch

TypeText WindowsKey,"r" -- open the Run panel

Wait 2

TypeText appToLaunch, return -- enter the name of the app to run and press return

end OpenApp

Mac

To launch an application on a Mac SUT:

on OpenApp appToLaunch

typeText F11 -- expose the desktop

Click (100,100) -- click anywhere to give the desktop (Finder) focus

TypeText ShiftKey, CommandKey, "a" -- shortcut to open the Applications folder

TypeText appToLaunch -- type the name of the app to select it

TypeText CommandKey, OptionKey, "o" -- open the selected app and close the window

end OpenApp

Calling the Handler From Your Main Script

Either of these would be called like this:

OpenApp "firefox"

Note: If you wanted to call both handlers within the same script in order to access both Mac and Windows systems, you would need to give them different names, such as OpenAppWin and OpenAppMac. You can always use conditional statements to determine which is necessary at any time, and execute the correct code.

 

This topic was last updated on August 19, 2021, at 03:30:51 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2022 Eggplant