Region method

Class: RegionPlatform: Selenium 3Language: Java SDK:

A constructor to an object describes a rectangular region at a particualar coordinate.

Syntax


Region obj = new Region(left, top, width, height);

Region obj = new Region(location, size);

Region obj = new Region(other);

Parameters

left
Type:int
The X coordinate of the left edge of the region in pixels.
top
Type:int
The Y coordinate of the top edge of the region in pixels.
width
Type:int
The width of the region in pixels.
height
Type:int
The height of the region in pixels.
location
Type:<a class ='link' href='/Content/api/eyes-sdk/index-gen/class-location-selenium-java.htm'>Location</a>
The object passed as a parameter specifies the top left of the new region. Instead of an object of the Location class, you can provide any object that meets the following definition:
 {x: number, y: number} 
.
size
Type:<a class ='link' href='/Content/api/eyes-sdk/index-gen/class-rectanglesize-selenium-java.htm'>RectangleSize</a>
The object provided as a parameter specifies dimensions of the region. Instead of an object of the Location class you can provide any object that meets the following definition:
 {width: number, height: number} 
.
other
Type:IRegion

Return value

Type: <a class ='link' href='/Content/api/eyes-sdk/index-gen/class-region-selenium-java.htm'>Region</a>