Class ObjectLocation


  • public class ObjectLocation
    extends Object
    Author:
    Madhav Krishna
    • Constructor Detail

      • ObjectLocation

        public ObjectLocation()
      • ObjectLocation

        public ObjectLocation​(int x,
                              int y,
                              int width,
                              int height)
        Object is within this limit.
        Parameters:
        x -
        y -
        width -
        height -
      • ObjectLocation

        public ObjectLocation​(Rectangle area)
        Object is within this area.
        Parameters:
        area -
      • ObjectLocation

        public ObjectLocation​(UIObject refObject,
                              ReferenceObjectPosition refObjectPosition,
                              int refObjDistanceInPx)
        Object is nearby reference object.
        Parameters:
        refObject -
        refObjectPosition -
        refObjDistanceInPx - approximate distance of ref object from actual object to determine object area where it can be found.
    • Method Detail

      • setLeftMarginOfRefObject

        public ObjectLocation setLeftMarginOfRefObject​(int leftMarginOfRefObjectInPx)
        Left Margin of the ref object is applicable if ReferenceObjectPosition is TOP or Bottom. It is used to determine the object distance from left side refObject.
        Parameters:
        leftMarginOfRefObjectInPx -
        Returns:
      • getRectangleOfImageObject

        public Rectangle getRectangleOfImageObject​(SmartAppDriver appDriver,
                                                   String leftSideImageOfImageObject,
                                                   String rightSideImageOfImageObject)
      • getRectangleOfImageObject

        public Rectangle getRectangleOfImageObject​(SmartAppDriver appDriver,
                                                   int width,
                                                   int height)
      • getRegion

        public org.sikuli.script.Region getRegion​(SmartAppDriver appDriver)
        This is applicable only for WITHIN LIMIT object.
        Returns:
      • getRegionOfImageObject

        public org.sikuli.script.Region getRegionOfImageObject​(SmartAppDriver appDriver,
                                                               String leftSideImageOfImageObject,
                                                               String rightSideImageOfImageObject)
      • getRegionOfImageObject

        public org.sikuli.script.Region getRegionOfImageObject​(SmartAppDriver appDriver,
                                                               int width,
                                                               int height)
      • getRegionOfImageObject

        public org.sikuli.script.Region getRegionOfImageObject​(SmartAppDriver appDriver,
                                                               String imageObject)