Using Assisted Scripting to Create Scripts

Assisted scripting in Eggplant Functional works with the Viewer window in Capture Mode to capture images from a system under test (SUT), assign actions to them, then insert the appropriate SenseTalk code to execute those actions into your script. Assisted scripting is one of several methods you can use to write scripts in Eggplant Functional. These methods can be combined, as well.

Step by Step: Assisted Scripting

To capture images and write scripts using the icons in the Viewer window, follow the steps below:

  1. Make sure you have a script open in the Eggplant Functional Suite window. You can use an existing script or create a new one as needed.
  2. Open a connection to an SUT. The Viewer window opens.
  3. In the Viewer window, click Enter Capture Mode.

    Entering Capture Mode takes you out of Live Mode, and darkens the screen of the SUT. A lighter box with red crosshairs inside appears on the screen. This box is the capture area, and the red crosshairs mark the hot spot. The hot spot is the point that is clicked when a script executes a command action on an image.

  4. Move the capture area over the screen element with which you want to interact. Resize the capture area according to image capture best practices.
  5. Click the button in the Viewer window toolbar that represents the action you want to take place when that image is clicked in your test.
  6. The Image Capture panel opens. Name the image, choose where to save it, and click Save.
  7. The SenseTalk code to execute the action is entered in your script.

Repeat steps 4-7 to add more images and actions to the script, if needed.

To read more about the Viewer window and using the Viewer window toolbar, see The Viewer Window.

Re-Using Images

To use an existing image with an action represented by one of the Viewer window toolbar icons, with any toolbar icon that requires use of an image, follow these steps:

On Mac

Option-Click the toolbar icon that corresponds to the action you want to execute. This opens a file browser from which you can choose the image you want to use.

On Windows

Click the Use Image button, and choose the image you want to use from the file browser. Select the action you want to execute from the drop-down list.

 

This topic was last updated on October 11, 2019, at 11:18:56 AM.

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