Using a selection tool

Hi,

I’m a newbie to Eggplant and can’t figure out how to draw and capture a selection. Like, for example, using the marquee tool in Photoshop or Mac OSX Screen Capture tool.

Many Thanks!

Perhaps you have Eggplant confused with another application? You can’t draw with Eggplant. You also need to be connected to a remote machine in order to perform a screen capture of that system. Once connected to a remote machine via VNC you can capture the screen of that system via the “Capture Screen” item under the Connection menu. You can also issue a CaptureScreen command within an Eggplant script (page 199 - Eggplant Reference).

There is no ability to capture the screen of the same system/user session that Eggplant is running in. I recommend using Grab for that.

Thanks for replying.

I wasn’t trying to capture the screen. The application I’m testing with has the ability to draw boxes. I use Eggplant’s “Click” to select the drawing tool, but I’m stuck on what to do next to result in a box being drawn in the application. I’ve tinkered with the “Move” and “Drag” functions in Eggplant, but nothing seems to happen in the application.

Yamazaki

A box can be drawn in one of many ways.

Example using coordinates:


Click "drawingTool"
Drag (200,200), (200,400), (400,400), (400,200), (200,200)

Example using image coordinates:


...
Drag "image0001", "image0002"....etc

Alternative to the drag command you can also use the moveto command in conjuction with the MouseButtonDown command to acheive the same effect:


...
MouseButtonDown 1 -- click and hold
Moveto "image0001", "image0002"...etc
MouseButtonUp 1 -- release the mouse button

If for some reason any one of these techniques do not work in your enivornment try adjusting the mouse down delay and the remote work interval to see if those have any effect.


set defaultMDD to the mouseDownDelay
set defaultRMI to the remoteWorkInterval

set the mouseDownDelay to 0.7
set the remoteWorkInterval to 1
Drag ......

// result options
set the mouseDownDelay to defaultMDD
set the remoteWorkInterval to defaultRMI