Functions

Static Public Summary
public

isActive(): Expectation<boolean, Element<'async'>>

Expectation that the element is active (has focus).

public

isClickable(): Expectation<boolean, Element<'async'>>

Expectation that an element is clickable, which means:

  • it exists
  • it is visible
  • it is within viewport (if not, try to scroll to it)
  • its center is not overlapped with another element
  • it is not disabled otherwise return false.
public

isEnabled(): Expectation<boolean, Element<'async'>>

Expectation that the element is enabled.

public

isPresent(): Expectation<boolean, Element<'async'>>

Expectation that the element is present in the DOM of a page.

public

isSelected(): Expectation<boolean, Element<'async'>>

Expectation that an <option> or <input> element of type checkbox or radio is currently selected.

public

isVisible(): Expectation<boolean, Element<'async'>>

Expectation that the element is present in the DOM of the page and visible.

Static Public

public isActive(): Expectation<boolean, Element<'async'>> source

import {isActive} from '@serenity-js/webdriverio/lib/expectations'

Expectation that the element is active (has focus). If the selector matches multiple elements, it will return true if one of the elements has focus.

Returns:

Expectation<boolean, Element<'async'>>

public isClickable(): Expectation<boolean, Element<'async'>> source

import {isClickable} from '@serenity-js/webdriverio/lib/expectations'

Expectation that an element is clickable, which means:

  • it exists
  • it is visible
  • it is within viewport (if not, try to scroll to it)
  • its center is not overlapped with another element
  • it is not disabled otherwise return false.

Returns:

Expectation<boolean, Element<'async'>>