मुख्य सामग्री पर जाएं

isEqual

चयनित तत्व प्रदान किए गए तत्व से मेल खाता है तो सत्य (true) लौटाता है।

उपयोग
$(selector).isEqual(el)
पैरामीटर्स
नामप्रकारविवरण
elElementतुलना करने के लिए तत्व
उदाहरण
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

Welcome! How can I help?

WebdriverIO AI Copilot