The Eggplant Functional Viewer Window
The Eggplant Functional (EPF) Viewer window opens when you make a connection to a system under test (SUT) through the Eggplant Functional interface. The window shows an image of the remote SUT as you would see it on its own display.
The Viewer window has two modes, Live Mode and Capture Mode. You can interact with the SUT as a user while in Live Mode, and you can capture images to use in Eggplant Functional scripts while in Capture Mode. To toggle between Live Mode and Capture Mode, click the Enter Capture Mode or Enter Live Mode icon in the Viewer window toolbar.
You can also toggle between Live Mode and Capture Mode by pressing Control on Windows or Command on Mac. You can select a different key to perform this action on the Viewer tab of Eggplant Functional Preferences (Eggplant > Preferences > Viewer).
Live Mode
The Viewer window in Live Mode
In Live Mode, you can use your local mouse and keyboard to interact with the SUT as a user. This interaction works as if you were using the SUT's own keyboard and mouse directly. In Live Mode, you can also copy and paste text between applications running on the SUT and your local computer.
You can use this functionality to navigate in the remote SUT, launch applications, and otherwise prepare the environment to capture images and perform the tests you're interested in.
If the Viewer window is not your local system's active window, your clicks and keystrokes are applied to your local computer, not the SUT.
Capture Mode
The Viewer window in Capture Mode
In Capture Mode, you can capture images from your SUT, combined with commands and functions that represent the actions you want to perform, then insert the resulting SenseTalk code into your current script. The Viewer window is dimmed in Capture Mode, except for the Capture Area, described below.
Capturing Images
To capture an image from the SUT, click the image. The Eggplant Functional edge detection functionality automatically sizes the Capture Area around the image for you. In most cases, the auto-sized image should work fine for SenseTalk scripting and image searches. However, you can adjust the size and placement of the Capture Area manually as well; see The Capture Area below for details.
When you capture an image based on automatic edge detection, the hot spot is placed where you clicked, which is not necessarily in the center of the image. You can move the hot spot as required. See The Hot Spot for complete information about the hot spot.
If you want to add the image to the suite without inserting code into a script, click Capture Image on the Viewer window toolbar, or right-click in the Capture Area and select Add Image.
To capture the image to the suite along with adding an associated line of code to your current script, click the appropriate button on the toolbar (e.g., Click, DoubleClick), or right-click in the Capture Area and select the appropriate action from the drop-down menu. The Viewer window provides many code options you can include with your captured images. This functionality is the basis for the assisted scripting method of script generation in Eggplant Functional.
When you have selected the method to capture the image, the Image Capture panel opens. This panel is basically a Save dialog box, but it provides additional opportunities for updating the options you want to use with the image in your scripts. See The Image Capture Panel for complete information.
For more information about image capture, see Image Capture Best Practices.
The Capture Area
The Capture Area in Eggplant Functional
In Capture Mode, the Capture Area shows the area that is included when you save an image. It is the rectangle shown at normal brightness when the rest of the Viewer window is dimmed. By default, Eggplant Functional uses edge detection to automatically size the Capture Area for images you click. When you click anywhere in the Viewer window while in Capture Mode, the Capture Area moves to that location and automatically sizes around what it detects as the image you clicked.
If you click an area of the screen where there is no image, or Eggplant Functional can't detect the edges of an image, the Capture Area still moves to that location and the size is set to the default, 64 X 64 pixels. You can use Shift+click to move the Capture Area to an image without using edge detection; the Capture Area moves to the new location without changing size so that you can manually adjust the edges as you wish.
To move the Capture Area, you can click and drag it to a new location. You can also nudge the Capture Area one pixel at a time by pressing the arrow keys. Use Shift+arrow to move the Capture Area in ten-pixel increments.
To resize the Capture Area, drag the edges. You can also nudge the size one pixel at a time with Alt+arrow (Option+arrow on Mac) keys. Add the Shift key to resize in ten-pixel increments.
The Capture Area includes a drop-down arrow at the upper-right. Clicking the button opens the context menu, which lets you select a command to include with the captured image to insert into your active SenseTalk script. Note that this is the same menu you see if you right-click within the Capture Area. Choose Add Image if you want to capture an image without adding SenseTalk code.
The Capture Area is drawn with a gray border to make it easier to see on dark backgrounds. You can turn this border off in Viewer window preferences.
The OCR Tuner
Adjust optical character recognition (OCR) search properties with the OCR Tuner. Open the OCR Tuner from the drop-down arrow located in the upper right corner of the Capture Area.
Launching the OCR Tuner in Eggplant Functional
You can also adjust these properties from the OCR Update Panel and from Text Preferences. See Using the OCR Tuner for more information.
The Hot Spot
The Capture Area with the hot spot highlighted
The hot spot is the red crosshairs that you see inside the Capture Area. The hot spot is the point that is clicked when a script executes a Click or other command action on an image. The red crosshairs automatically turn black when the Capture Area is positioned over a predominantly red image.
To move the hot spot in a Capture Area, Ctrl+click or Ctrl+drag the crosshairs (Cmd+click or Cmd+drag on Mac). You can also nudge the hot spot in one-pixel increments with Ctrl+arrow (Cmd+arrow on Mac). Adding the Shift key moves the hot spot in ten-pixel increments.
You can position the hot spot outside of the Capture Area. This can be useful when you need a click or other action to happen at a location that doesn't include an easily recognizable image, such as within a text field. You can capture an image that will be found in the same location relative to the spot where you want the action to take place, then move the hot spot the location where you want the action to occur.