By.id constructor

const By.id(
  1. String id
)

Returns an element whose ID attribute matches the search value.

Implementation

const By.id(String id) : this('id', id);