You are here: eggPlant Functional > FAQ > How can I launch an application on the SUT?

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. Please find examples of how to do this on both Windows and Mac below.


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


To launch an application on a Mac OS X 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 September 20, 2016, at 12:07:25 PM.