Getting Started
IntroductionGetting startedOverviewRunning TestoTests running policyTesto for Hyper-V Guides
Guide 1. The very first testGuide 2. Ubuntu Server InstallationGuide 3. Internet access in virtual machinesTesto for QEMU Guides
Guide 1. The very first testGuide 2. Ubuntu Server InstallationGuide 3. Guest AdditionsGuide 4. ParamsGuide 5. CachingGuide 6. Internet access in virtual machinesGuide 7. Linking up virtual machinesGuide 8. Flash DrivesGuide 9. MacrosGuide 10. If clauseGuide 11. No snapshotsGuide 12. Mouse controlGuide 13. Importing disk imagesGuide 14. JS-selectorsGuide 15. CyclesGuide 16. Macros with declarationsReference
Test scripts general overviewTesto lang basic syntaxVirtual Machine declarationVirtual flash drive declarationVirtual network declarationParamsTests declarationMacrosVirtual Machines ActionsMouse actionsDetecting images on the screenVirtual Flash Drives ActionsConditionsCyclesPossible keyboard key IDsJavascript selectors
Main conceptsBuilt-in global functionsExceptionsClass TextTensorClass ImgTensorClass PointClass ImgTensor
Class ImgTensor
contains the information about images on the screen. Could be obtained with a find_img
global function call.
Methods
from_top(index)
Select the image with the specified index from the array of images sorted from top to bottom.
Arguments:
index <integer>
- the index of the image to be selected. With theindex == 0
the "uppermost" image on the screen will be selected.
Return value - new object of ImgTensor
, containing just one selected image.
Images are sorted by the Y coordinate of the top edge of the images.
from_bottom(index)
Select the image with the specified index from the array of images sorted from bottom to top.
Arguments:
index <integer>
- the index of the image to be selected. With theindex == 0
the "lowermost" image on the screen will be selected.
Return value - new object of ImgTensor
, containing just one selected image.
Images are sorted by the Y coordinate of the bottom edge of the images.
from_left(index)
Select the image with the specified index from the array of images sorted from left to right.
Arguments:
index <integer>
- the index of the image to be selected. With theindex == 0
the most left image on the screen will be selected.
Return value - new object of ImgTensor
, containing just one selected image.
Images are sorted by the X coordinate of the left edge of the images.
from_right(index)
Select the image with the specified index from the array of images sorted from right to left.
Arguments:
index <integer>
- the index of the image to be selected. With theindex == 0
the most right image on the screen will be selected.
Return value - new object of ImgTensor
, containing just one selected image.
Images are sorted by the X coordinate of the right edge of the images.
center()
Return a Point with the coordinates of the geometric center of the image.
Arguments: no
Return value - new object Point
, containing the coordinates of the geometic center of the image.
This method is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
left_bottom()
Return a Point with the coordinates of the bottom left corner of the image.
Arguments: no
Return value - new object Point
, containing the coordinates of the bottom left corner of the image.
This method is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
left_center()
Return a Point with the coordinates of the center of the left edge of the image.
Arguments: no
Return value - new object Point
, containing the coordinates of the center of the left edge of the image.
This method is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
left_top()
Return a Point with the coordinates of the top left corner of the image.
Arguments: no
Return value - new object Point
, containing the coordinates of the top left corner of the image.
This method is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
center_bottom()
Return a Point with the coordinates of the center of the left edge of the image.
Arguments: no
Return value - new object Point
, containing the coordinates of the center of the left edge of the image.
This method is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
center_top()
Return a Point with the coordinates of the center of the top edge of the image.
Arguments: no
Return value - new object Point
, containing the coordinates of the center of the top edge of the image.
This method is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
right_bottom()
Return a Point with the coordinates of the bottom right corner of the image.
Arguments: no
Return value - new object Point
, containing the coordinates of the bottom right corner of the image.
This method is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
right_center()
Return a Point with the coordinates of the center of the right edge of the image.
Arguments: no
Return value - new object Point
, containing the coordinates of the center of the right edge of the image.
This method is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
right_top()
Return a Point with the coordinates of the top right corner of the image.
Arguments: no
Return value - new object Point
, containing the coordinates of the top right corner of the image.
This method is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
Properties
x <integer>
The X coordinate value (the bigger x
means more towards the right).
This property is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.
y <integer>
The Y coordinate value (the bigger y
means more towards the bottom)
This property is accessible only when the current
ImgTensor
contains exactly one image. Otherwise an error is generated.