Examples
Examples usage of binder with "untilElementLocated" api.
const { untilElementLocated } = binder(driver);
untilElementLocated({ xpath: '//*[@id="testXpath"]/div' }).then((webElement) => {
// After resolve promise We'll get the "webElement" object for HTML element whose "xpath" we pass.
// By the help of "webElement" we click on HTML element.
}).catch((error) => {
// handle error
});
Examples usage of binder with "findElement" api.
const { findElement } = binder(driver);
findElement({ xpath: '//*[@id="testXpath"]/div' }).then((webElement) => {
// After resolve promise We'll get the "webElement" object for HTML element whose "xpath" we pass.
// By the help of "webElement" we click on HTML element.
}).catch((error) => {
// handle error
});