Action
Returns the object-relative rectangle of the specified image asset.
Syntax
returnRectangle = TestObject.ImageRectangleFile(imageAsset, [occurrence, searchRectangle])
Variable
|
Description
|
returnRectangle
|
The rectangle of the specified image asset
or an empty rectangle if the image asset is not found.
Rect.
|
imageAsset
|
The name of the image asset to click on.
String.
|
occurrence
|
Optional: The occurrence of the image asset for
which the rectangle should be returned, if there are multiple occurrences. The
first occurrence is 1. The default value is 1.
Integer.
|
searchRectangle
|
Optional: The object-relative rectangle in which
to search for the image asset.
Rect .
|
Example
Assume you have a PNG image with the name
myImage. To get the object-relative rectangle of the
image, you can use the following code:
imageRectangle = control.ImageRectangle("myImage")