testObject.ImageClickFile(imageFile, [position, occurrence, clickType, modifiers, timeout]);
testObject.ImageClickFile(imageFile, [position, occurrence, clickType, modifiers, timeout])
Variable | Description |
---|---|
imageFile | An absolute path to an image file of one of the following
types:
Note: This path can be either absolute or relative to the
working directory during playback.
STRING.
|
position | Optional: The coordinates at which to click. The coordinates are relative to the upper-left corner of the image. To click in the center of the image use ClickPosition.Center. The default value is the center of the image. Point. |
occurrence | Optional: The occurrence of the image that should be clicked, if there are multiple occurrences. The first occurrence is 1. The default value is 1. Integer. |
clickType | Optional: The desired mouse action. The default value is left click. ClickType . |
modifiers | Optional: The modifier keys, Alt, Shift, or Ctrl, to press while clicking. Default: No modifier keys are used. ModifierKeys. |
timeout | Optional: The maximum time in milliseconds to wait for the image to appear. If the timeout is not specified, the ImageClick method waits for the image to appear until the Object resolve timeout is over. Integer. |
Assume you have an image with the name myImage.png in the directory C:\temp.
control.ImageClickFile("C:\temp\myImage.png");
control.ImageClickFile("C:\temp\myImage.png", new Point(10, 20));
control.ImageClickFile("C:\temp\myImage.png", ClickPosition.Center, 2, ClickType.Right);
control.ImageClickFile("C:\temp\myImage.png", ClickPosition.Center, 1, ClickType.Left, ModifierKeys.None, 2000);
Assume you have an image with the name myImage.png in the directory C:\temp.
control.ImageClick("C:\temp\myImage.png")
control.ImageClick("C:\temp\myImage.png", New Point(10, 20))
control.ImageClick("C:\temp\myImage.png", ClickPosition.Center, 2, ClickType.Right)
control.ImageClickFile("C:\temp\myImage.png", ClickPosition.Center, 1, ClickType.Left, ModifierKeys.None, 2000)