isEqual
Retorna verdadeiro se o elemento selecionado corresponde ao fornecido.
Uso
$(selector).isEqual(el)
Parâmetros
| Nome | Tipo | Detalhes |
|---|---|---|
el | Element | elemento para comparar |
Exemplo
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
});
Retorna
- <Boolean>
return: verdadeiro se os elementos são iguais