CheckBox
The Check Box class provides a clean interface for interacting with generic container elements such as <checkBox> blocks. It includes methods for selection, assertions, and scrolling into view.
Usage : checkBox
checkBox🧩 Code
The CheckBox class is designed to interact with common check-box element
To insert a code block with syntax highlighting:
import { oi } from "@ordino.ai/spartify-engine";
oi.ui.checkbox(this.cbx_element).check(true)import { oi } from "@ordino.ai/spartify-engine";
await oi.ui(this.page).checkbox(this.element).check(true)Methods
check(forceClick?: boolean): void
Checks the checkbox.
@returns void
oi.ui.checkbox(this.cbx_element).check(true)await oi.ui(this.page).checkbox(this.cbx_element).check(true)uncheck(forceClick?: boolean): void
Unchecks the checkbox.
@returns void
toggleCheck(forceClick?: boolean): void
Toggles the checkbox state.
@returns void
checkAll(forceClick?: boolean): void
Checks all checkboxes.
@returns void
uncheckAll(forceClick?: boolean): void
Unchecks all checkboxes.
@returns void
checkByIndex(index: number): void
Checks the checkbox at the specified index. @param index - the index of the checkbox to check.
@returns void
uncheckByIndex(index: number): void
Unchecks the checkbox at the specified index. @param index - the index of the checkbox to uncheck.
@returns void
checkByText(text: string): void
Checks the checkbox with the specified text. @param text - The text of the checkbox to check.
@returns void
uncheckByText(text: string): void
Unchecks the checkbox with the specified text. @param text - the text of the checkbox to uncheck.
@returns void
clickWithOffset(x: number, y: number, forceClick:boolean): void
Clicks the checkbox with an offset. @param x - The x offset. @param y - The y offset
@returns void
Assertions
isChecked(): void
Asserts that the checkbox is checked.
@returns void
isNotChecked(): void
Asserts that the checkbox is not checked
@returns void
assertIsIndeterminate(): void
Asserts that the checkbox is in an indeterminate state.
@returns void
assertCheckedCount(count: number): void
Asserts that the number of checked checkboxes matches the specified count. @param count - the expected number of checked checkboxes.
@returns void
assertUncheckedCount(count: number): void
Asserts that the number of unchecked checkboxes matches the specified count. @param count - the expected number of unchecked checkboxes.
@returns void
assertIsDisabled(): void
Asserts that the checkbox is disabled.
@returns void
assertIsEnabled(): void
Asserts that the checkbox is enabled.
@returns void
isContained(text: string): void
Asserts that the checkbox contains the specified text. @param text - the text to check for containment.
@returns void
isEqual(text: string): void
Asserts that the checkbox text is equal to the specified text.
@returns void
isNotEqual(text: string): void
Asserts that the checkbox text is not equal to the specified text. @param text - the text to compare.
@returns void
Scrolling
scrollToElement(): void Scrolls to the checkbox element.
@returns void
Custom Events
Ordino allows you to build custom actions or user journeys by directly interacting with the underlying tool’s native methods and actions.
This approach gives you full control, bypassing Ordino’s abstraction layer, and ensures you can leverage tool-specific capabilities as needed.
locator→ The element locator (e.g., XPath, CSS selector, or tool-specific reference).Returns → A tool element object on which you can invoke native actions (e.g.,
.check(),.uncheck()).
Ordino Custom Mode
Using Ordino’s direct tool method reference:
Here, Ordino will call the Cypress (or other tool) element object directly, rather than going through Ordino’s wrapper.
Building User Journeys
By chaining multiple oi.ui.element() calls, you can construct full user journeys while still working with native tool methods.
Example: Login Flow
Key Notes
Use this mode when you need maximum control over the test framework.
This does not abstract or transform the call – it executes directly on the tool object (e.g., Cypress, Playwright, etc.).
Perfect for custom journeys, advanced locators, or tool-specific actions not exposed by Ordino’s higher-level API.
Last updated