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

アサーション

アサーションの一覧

アサーション説明
assertThat(locator).isAttached()要素がアタッチされている
assertThat(locator).isChecked()チェックボックスがチェックされている
assertThat(locator).isDisabled()要素が無効になっている
assertThat(locator).isEditable()要素が編集可能である
assertThat(locator).isEmpty()コンテナが空である
assertThat(locator).isEnabled()要素が有効になっている
assertThat(locator).isFocused()要素がフォーカスされている
assertThat(locator).isHidden()要素が表示されていない
assertThat(locator).isInViewport()要素がビューポートと交差する
assertThat(locator).isVisible()要素が表示されている
assertThat(locator).containsText()要素がテキストを含む
assertThat(locator).hasAccessibleDescription()要素に一致するアクセシブルな説明がある
assertThat(locator).hasAccessibleName()要素に一致するアクセシブルな名前がある
assertThat(locator).hasAttribute()要素に DOM 属性がある
assertThat(locator).hasClass()要素にクラスプロパティがある
assertThat(locator).hasCount()リストに正確な数の子要素がある
assertThat(locator).hasCSS()要素に CSS プロパティがある
assertThat(locator).hasId()要素に ID がある
assertThat(locator).hasJSProperty()要素に JavaScript プロパティがある
assertThat(locator).hasRole()要素に特定のARIA ロールがある
assertThat(locator).hasText()要素がテキストに一致する
assertThat(locator).hasValue()入力に値がある
assertThat(locator).hasValues()セレクトボックスでオプションが選択されている
assertThat(page).hasTitle()ページにタイトルがある
assertThat(page).hasURL()ページに URL がある
assertThat(response).isOK()レスポンスが OK ステータスである