isEqual
Restituisce true se l'elemento selezionato corrisponde a quello fornito.
Utilizzo
$(selector).isEqual(el)
Parametri
Nome | Tipo | Dettagli |
---|---|---|
el | Element | elemento con cui confrontare |
Esempio
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
});
Restituisce
- <Boolean>
return
: true se gli elementi sono uguali