Skip to content

Toast

Methods & Usage

click(): void
Simulates a click on the toast element.

@return void

oi.ui.toast(this.toast_element).click();

forceClick(): void
Forces a click on the toast element, bypassing any potential blockers.

@return void

oi.ui.toast(this.toast_element).forceClick();

Assertions

assertToast(): void
Asserts that the text of the toast matches the specified text.

@param text - The text of the toast to match.
@return void

oi.ui.toast(this.toast_element).assertToast(‘hello’);

isDisplayed(): boolean
Asserts that the toast element is displayed.

@return boolean

oi.ui.toast(this.toast_element).isDisplayed();

isEnabled(): boolean
Asserts that the toast element is enabled.

@return boolean

oi.ui.toast(this.toast_element).isEnabled();

isDisabled(): boolean
Asserts that the toast element is disabled.

@return boolean

oi.ui.toast(this.toast_element).isDisabled();

isFocused(): boolean
Asserts that the toast element is currently focused.

@return boolean

oi.ui.toast(this.toast_element).isFocused();