The Script Editor
Use the Eggplant Functional Suite window to manage all of the scripts in the active suite. You also use it to create new scripts and run scripts.
Video: Organization in Eggplant Functional
The following video describes organizational features in Eggplant Functional, including those related specifically to scripts and their component parts.
Scripts Pane
The Suite window's Scripts pane on the left sidebar shows all of the scripts in the suite, and can include scripts in attached helper suites. When you select a script in the Scripts pane, the main pane of the Suite window opens a Script Editor tab with your selected script displayed in preview mode (in a temporary tab). If you click away from it, its tab goes away. When a script is in preview mode, the Script Editor appears gray. To make the tab persist, click it or click into the script.
When you add helper suites on the Settings tab, their scripts are shown by default in the Scripts pane. Helper suites and their scripts display in italic type in the scripts list. To turn off display of helper suites scripts, right-click within the Scripts pane, then select Show Helper Suites Scripts. On Mac, you can also click the gear icon at the top of the pane, then select the menu item from the drop-down list. If you open a script from a helper suite, it opens in a new Suite window. If you view a script from a helper suite in preview more, however, it opens in the current suite.
Actions List
Right-click within the Scripts pane (or on a specific script in the list) for a list of actions you can perform. On Mac, you can also click the gear icon at the top of the pane to view the actions list. Your options include:
- New Script: Creates a new, untitled script in the scripts list, and a new Script Editor tab opens. You can also select New Script from the File menu.
- Run: Executes the selected script; you can also click the
Run
button on the Script Editor toolbar. - Debug: Runs the selected script in debug mode.
- Open: Opens a script from preview mode into a permanent Script Editor tab for editing. You can also double-click the script name to open it, or you can click in the Script Editor when the script is displayed in preview mode.
- Reveal In Explorer/Finder: Opens a Windows Explorer or Mac Finder window and shows the location of the current script.
- Rename: Allows you to change the name of the current script.
- Delete: Deletes the selected script. You can select and delete multiple scripts at one time. All Script Editor tabs associated with deleted scripts close.
- New Folder: Creates a new folder, which you can use for organizing scripts. When you create a new folder, the name will be highlighted so that you can rename it to fit your needs. If you have a folder selected when you select the New Folder option,the new folder is created inside the original folder. See the note below about referencing scripts in folders.
- Show Folders First: Select this option if you want folders to appear first in the list before items that are not inside folders.
- Show Table Actions: Turns on the color indicator in the Scripts list so that any scripts that are enabled as table actions are shown in blue.
- Show Helper Suites Items: This option is selected by default when you attach helper suites on the Settings tab. Helper suites scripts are shown inside a folder for the helper suite, and both the folder and the script names display in italics in the list.
- Sort by: This section lets you sort the scripts list by
Name
,Modified Date
,Last Run Date
, orStatus
. - Source Control: These options let you work with content if your suite is under source control management (SCM). For information about using Commit and Discard Changes, see Working with Suites Under SCM.
Referencing Scripts in Folders
When you want to call a script from within another script, typically all you need to do is include the name of the script you're calling. For example, a line of code such as
helper1
would call a script named helper1
that was in the same suite as the calling script.
If you use folders to organize your scripts, you need to use the full path, including the folder name, to reference those scripts when you call them from other scripts, and you need to use the Run
command with the path enclosed in quotes. For example, if a script is in the same suite but in a folder, the SenseTalk line might look like this:
Run "Folder1/Helper1"
If the script you're calling is in a helper suite, the full path includes the file system path, which might look like this:
Run "Y:/Documents/ePFSuites/gherkin.suite/Scripts/CalcTesting2"