متساوي
إرجاع القيمة "صحيح" إذا كان العنصر المحدد يتطابق مع العنصر المقدم.
الاستخدام
$(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
: صحيح إذا كانت العناصر متساوية