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