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 状态 |