copy Copy chevron-down
code SDK Referencechevron-right toggle-off ComponentsDiv The Div class provides a clean interface for interacting with generic container elements such as <div> blocks. It includes methods for selection, assertions, and scrolling into view.
The Div class is designed to interact with common div element
To insert a code block with syntax highlighting:
Copy import { oi } from " @ordino.ai/spartify-engine " ;
oi . ui . div ( this . div_element ) . click ()
Copy import { oi } from " @ordino.ai/spartify-engine " ;
await oi . ui ( this . page ) . div ( this . div_element ) . click () click(): void
Simulates a click on the div element.
Copy oi . ui . div ( this . element ) . click ()
Copy await oi . ui ( this . page ) . div ( this . element ) . click () forceClick(): void
Forces a click on the div element, bypassing any potential blockers.
Copy oi . ui . div ( this . element ) . forceClick ()
Copy await oi . ui ( this . page ) . div ( this . element ) . forceClick () doubleClick(forceClick: boolean): void
Simulates a double-click on the div element.
@param {force} – true (optional)
rightClick(): void
Simulates a right-click on the div element.
@param {force} – true (optional)
clickDivWithCoordinates(x: number, y: number,forceClick:boolean): void
Simulates a click on the div element at the specified coordinates.
@param {x} – The x-coordinate for the click.
@param {y} – The y-coordinate for the click.
@param {force} – { force: true } optional
centerClick(forceClick: boolean): void
Simulates a click on the center of the div element.
@param {force} – true (optional)
multiElementClick(forceClick: boolean): void
Simulates a click on multiple div elements.
@param {force} – true (optional)
firstElementClick(forceClick: boolean): void
Simulates a click on the first div element in a collection.
@param {force} – true (optional)
lastElementClick(forceClick: boolean): void
Simulates a click on the last div element in a collection
@param {force} – true (optional)
getDivText(): void
Retrieves the text content of the div element.
isEnabled(): void
Asserts that the div element is enabled
@returns trueif the div is enable, otherwise false.
isDisabled(): void
Asserts that the div element is disabled
@returns trueif the div is enable, otherwise false.
isDisplayed(): void
Asserts that the div element is displayed
@returns trueif the div is enable, otherwise false.
isFocused(): void
Asserts that the div element is focused
@returns trueif the div is enable, otherwise false.
assertDivIsVisible(): boolean
Asserts that the div element is visible.
@returns trueif the div is visible, otherwise false.
assertDivIsNotVisible(): boolean
Asserts that the div element is not visible.
@returns trueif the div is visible, otherwise false.
assertDivIsEmpty(): boolean
Asserts that the div element is empty.
@returns trueif the div is visible, otherwise false.
scrollUntill(): void
Scrolls until the div element is in view.
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., .click(), .type()).
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
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 5 months ago