Action
Returns the object-relative rectangle of the specified image.
Syntax
returnRectangle = TestObject.ImageRectangleFile(imageFilePath, [occurrence, searchRectangle])
Variable
|
Description
|
returnRectangle
|
The rectangle of the specified image or an
empty rectangle if the image is not found.
Rect.
|
imageFile
|
- A path to a file
of one of the following types:
String.
|
occurrence
|
Optional: The occurrence of the image 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.
Rect .
|
Example
Assume you have a PNG image with the name
myImage in the folder
c:/temp. To get the object-relative rectangle of
the image, you can use the following code:
imageRectangle = control.ImageRectangleFile("c://temp/myImage.png")