View Source Improve this doc

elementIdLocation

Determine an element’s location on the page. The point (0, 0) refers to the upper-left corner of the page. The element’s coordinates are returned as a JSON object with x and y properties.

This command is deprecated and will be removed soon. Make sure you don’t use it in your automation/test scripts anymore to avoid errors. Please use the elementIdRect command instead.

Usage

1
browser.elementIdLocation(ID);

Parameters

Param Type Details
ID String ID of a WebElement JSON object to route the command to

Returns

  • <Object>: The X and Y coordinates for the element on the page ({x:number, y:number})