getLocation
Determine an element’s location on the page. The point (0, 0) refers to the upper-left corner of the page.
Usage
1 | browser.getLocation(selector,property); |
Parameters
Param | Type | Details |
---|---|---|
selector | String | element with requested position offset |
property | String | can be “x” or “y” to get a result value directly for easier assertions |
Example
1 | it('should get the location of one or multiple elements', function () { |
Returns
- <Object/Object[]>: The X and Y coordinates for the element on the page (
{x:number, y:number}
)