untilElementsLocatedByXpath(driver, xpath, timeopt) → {Array.<Object>|Error}
untilElementsLocatedByXpath
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
driver |
Object |
webdriver object of web browser. |
|
xpath |
String |
xpath of HTML element in DOM. |
|
time |
Number | <optional> |
time is optional.This parameter represent for how much time user want to wait for "webElement". After time finish it returns error. |
Returns:
return a Array of object of "webElement". If we pass time param & it will not get "webElement", it will return error.
- Type
- Array.<Object> | Error
Example
Examples usage of untilElementsLocatedByXpath by HTML element xpath
untilElementsLocatedByXpath(driver, { xpath: '//*[@id="testXpath"]/div' }, time).then((webElement) => {
// After resolve promise We'll get the "webElement" Array of object for HTML element whose "xpath" we pass.
}).catch((error) => {
// handle error
});