AnyWin class.
Double-clicks a mouse button on the window.
window.DoubleClick ([iButton, iXpos, iYpos, bRawEvent])
Variable | Description |
---|---|
iButton |
Optional: The mouse button to press: Windows: 1 for left (default), 2 for right, and 3 for center.
INTEGER.
You can also use the following mouse button identifiers:
|
iXpos | Optional: The horizontal coordinate (relative to the window) to click. If you specify iXpos, you must also specify iYpos. The default is 0. When you are working with the Classic Agent, the default coordinate is 0 for a window and the button center for a pushbutton. When you are working with the Open Agent, the default coordinate is the center of the window or the pushbutton. INTEGER. |
iYpos | Optional: The vertical coordinate (relative to the window) to click. The default is 0. When you are working with the Classic Agent, the default coordinate is 0 for a window, or the button center for a pushbutton. When you are working with the Open Agent, the default coordinate is the center of the window or the pushbutton. INTEGER. |
bRawEvent | 32-bit Windows only. Optional. Used to specify playback method. The Open Agent ignores this value regardless of what is specified in the script. BOOLEAN. |
DoubleClick moves the mouse to the window and double-clicks the specified mouse button. DoubleClick moves the mouse to the coordinates specified by iXpos and iYpos before performing the double-click. These coordinates are relative to the client area of the window (that is, the window's internal area, excluding its caption, menu bar, and border). If you do not specify coordinates, the double-click occurs in the upper-left corner (0, 0) of the client area of the window.
When you are working with the Classic Agent, and you do not specify coordinates, the doubleclick occurs in the upper-left corner (0, 0) of the client area of the window or in the center of the pushbutton.
When you are working with the Open Agent, and you do not specify coordinates, the doubleclick occurs in the center of the client area of the window or in the center of the pushbutton.
By default, Silk Test Classic verifies that the coordinates fall within the current window and generates the exception E_COORD_OUTSIDE_WINDOW if they do not. You can override this default by setting the OPT_VERIFY_COORD option to FALSE with the SetOption method.
// Open the File Open dialog TextEditor.File.Open.Pick () // Double-click root directory in Directories list box //(works even if list box is a custom list box) Open.Directories.DoubleClick (1, 10, 10)