Test if two web element IDs refer to the same DOM element.

This command is deprecated and is only available on the JSON Wire protocol

Please note that this command operates on a protocol level and accepts the Web Element ID as the parameter. To retrieve it, use either the .element() or .elements() command. Read more on Element retrieval.

Usage

Parameters

Name Type description
webElementId string

The Web Element ID of the element to route the command to.

otherId string

The Web Element ID of the other element to compare against.

callback function

Callback function which is called with the result value.

Example

module.exports = {
 'demo Test' : function(browser) {
    browser.elementIdEquals('', '', function(result) {
      console.log(result.value)
    });
  }
}

W3C WebDriver spec