.getPreviousSibling() Suggest edits
Since: 2.0.0Returns the element immediately preceding the specified one in its parent's child elements list. The element will be returned as web element JSON object (with an added .getId()
convenience method).
Usage
Parameters
Name | Type | description |
---|---|---|
selector |
string|object | The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies element properties. |
callback |
function | Callback function which is called with the result value. |
Returns
Type | description |
---|---|
object | The resolved element object, which contains a convenience .getId() method that can be used to retrieve the element ID |