Toast
Methods & Usage
click(): void
Simulates a click on the toast element.
@return void
oi.ui.toast(this.toast_element).click();
await oi.ui(this.page).toast("this").click();
forceClick(): void
Forces a click on the toast element, bypassing any potential blockers.
@return void
oi.ui.toast(this.toast_element).forceClick();
await oi.ui(this.page).toast("this").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’);
await oi.ui(this.page).toast("this").assertToast('Click me to show a toast');
isDisplayed(): boolean
Asserts that the toast element is displayed.
@return boolean
oi.ui.toast(this.toast_element).isDisplayed();
await oi.ui(this.page).toast("this").isDisplayed();
isEnabled(): boolean
Asserts that the toast element is enabled.
@return boolean
oi.ui.toast(this.toast_element).isEnabled();
await oi.ui(this.page).toast("this").isEnabled();
isDisabled(): boolean
Asserts that the toast element is disabled.
@return boolean
oi.ui.toast(this.toast_element).isDisabled();
await oi.ui(this.page).toast("this").isDisabled();
isFocused(): boolean
Asserts that the toast element is currently focused.
@return boolean
oi.ui.toast(this.toast_element).isFocused();
await oi.ui(this.page).toast("this").isFocused();