Location method

Class: LocationPlatform: WebdriverIO 5Language: JavaScript SDK:

A constructor that provides several ways to specify the Location coordinates.

For user convenience, the values may be given as numbers or taken from another object.

Syntax


let obj = new Location(location);

let obj = new Location(object);

let obj = new Location(x, y);

Parameters

location
Type:<a class ='link' href='/Content/api/eyes-sdk/index-gen/class-location-webdriverio_sdk5-javascript.htm'>Location</a>
Another location object whose coordinate value is cloned to create this object.
object
Type:{x:number,y:number}
The location attributes will be cloned from the object passed as a parameter.
x
Type:number
The horizontal coordinate of the point in pixels (from the left of the image).
y
Type:number
The vertical coordinate of the point in pixels (from the top of image).

Return value

Type: <a class ='link' href='/Content/api/eyes-sdk/index-gen/class-location-webdriverio_sdk5-javascript.htm'>Location</a>