UNPKG

webdriverio

Version:

Next-gen browser and mobile automation test framework for Node.js

33 lines (31 loc) • 1.1 kB
/** * * Return true if the selected element matches with the provided one. * * :::info * * As the other element commands, `isEqual` compares the elements that are on the page now. When the * page renders an element again (for example a React re-render), the command finds it again with its * selector, once and without a wait. An element that is gone is not equal. A strict element that * matches more than once then throws a `StrictSelectorError`, as the other checks do. * * ::: * * <example> :isEqual.js it('should detect if an element is clickable', async () => { const el = await $('#el') const sameEl = await $('#el') const anotherEl = await $('#anotherEl') el.isEqual(sameEl) // outputs: true el.isEqual(anotherEl) // outputs: false }); * </example> * * @alias element.isEqual * @param {Element} el element to compare with * @return {Boolean} true if elements are equal * */ export declare function isEqual(this: WebdriverIO.Element, el: WebdriverIO.Element): Promise<boolean>; //# sourceMappingURL=isEqual.d.ts.map