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

アサーション

アサーションのリスト

アサーション説明
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).containsClass()要素に指定されたCSSクラスが含まれる
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(locator).matchesAriaSnapshot()要素が提供されたAriaスナップショットに一致
assertThat(page).hasTitle()ページにタイトルがある
assertThat(page).hasURL()ページに URL がある
assertThat(response).isOK()レスポンスが OK ステータスを持つ