メインコンテンツにスキップ

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