isEqual
चयनित तत्व प्रदान किए गए तत्व से मेल खाता है तो सत्य (true) लौटाता है।
उपयोग
$(selector).isEqual(el)
पैरामीटर्स
नाम | प्रकार | विवरण |
---|---|---|
el | Element | तुलना करने के लिए तत्व |
उदाहरण
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
});
रिटर्न्स
- <Boolean>
return
: तत्व समान होने पर true