findElementsById(driver, id) → {Array.<Object>}
findElementsById
Parameters:
Name | Type | Description |
---|---|---|
driver |
Object |
webdriver object of web browser. |
id |
String |
id attribute of HTML element. |
Returns:
return a object of "webElement".
- Type
- Array.<Object>
Example
Examples usage of findElementsById by HTML element id
findElementsById(driver, 'testId' ).then((webElement) => {
// After resolve promise We'll get the Array of "webElement" object for HTML element whose "id" is similar.
// Here 'testId' is id attribute value of HTML element.
}).catch((error) => {
// handle error
});