なんだかGoodVibes

日々の勉強メモです。

2022-08-01から1ヶ月間の記事一覧

【Cypress】特定の要素の子孫要素から条件に一致する要素を取得する(find)

こんにちは。 本日はCypressメモです。 概要 テンプレート Cypress 概要 特定の要素の子孫要素から 条件に一致する要素を取得したい。 テンプレート html <div class="input-area"> <input type="checkbox" class="chkbox" value="1">チェック1 <input type="checkbox" class="chkbox" value="2">チェック2 <input type="checkbox" class="chkbox" value="3">チェック3 </div>

【Cypress】要素をフィルターする(filter)

こんにちは。 本日はCypressメモです。 概要 テンプレート Cypress 概要 特定の要素群の中から、 指定した条件に一致する要素を抽出して取得したい。 テンプレート html <div class="input-area"> <input type="checkbox" class="chkbox" value="1">チェック1 <input type="checkbox" class="chkbox" value="2">チェック2 <input type="checkbox" class="chkbox" value="3">チェック3 </div>

【Cypress】指定インデックスの要素を取得する(eq)

こんにちは。 本日はCypressメモです。 概要 テンプレート Cypress 概要 指定した要素内に含まれる要素を インデックスを使用して取得したい。 テンプレート html <div class="input-area"> <input type="checkbox" class="chkbox" value="1">チェック1 <input type="checkbox" class="chkbox" value="2">チェック2 <input type="checkbox" class="chkbox" value="3">チェック3 </div> <div> </div>

【Cypress】要素をループして操作する(each)

こんにちは。 本日はCypressメモです。 概要 テンプレート Cypress 概要 複数の要素を一括で取得して、 その要素を回して操作やチェックをしたい。 テンプレート html <div> <input type="checkbox" class="chkbox" value="1">チェック1 <input type="checkbox" class="chkbox" value="2">チェック2 <input type="checkbox" class="chkbox" value="3">チェック3 </div> Cypress クラス名がchkboxとなっている要素に対して ク…