E2ETestScope

The primary execution scope for a Parikshan end-to-end test.

This scope provides an intent-based DSL for interacting with your Compose Multiplatform application across all supported platforms.

Functions

Link copied to clipboard
fun artifactPath(relativePath: String): String
Link copied to clipboard
suspend fun assertNotVisible(tag: String, message: String? = null)

Asserts that an element matching the tag is NOT visible in the UI.

suspend fun assertNotVisible(selector: Selector, message: String? = null, timeoutMs: Long = config.defaultWaitTimeoutMs)

Asserts that an element matching the selector is NOT visible in the UI.

Link copied to clipboard
suspend fun assertText(selector: Selector, expected: String)

Asserts that the element matching the selector contains the expected text.

suspend fun assertText(tag: String, expected: String)

Asserts that the element matching the tag contains the expected text.

Link copied to clipboard
suspend fun assertVisible(selector: Selector)

Asserts that an element matching the selector is present and visible in the UI.

suspend fun assertVisible(tag: String)

Asserts that an element matching the tag is present and visible in the UI.

Link copied to clipboard
suspend fun click(selector: Selector)

Executes a physical tap or click on the UI element matching the selector.

suspend fun click(tag: String)

Executes a physical tap or click on the UI element matching the provided tag.

Link copied to clipboard
suspend fun getTree(): List<NodeSnapshot>
Link copied to clipboard
suspend fun hasVisibleNode(selector: Selector): Boolean
suspend fun hasVisibleNode(selector: String): Boolean
Link copied to clipboard
suspend fun input(selector: Selector, text: String)

Clears any existing text and inputs the provided text into the element matching the selector.

suspend fun input(tag: String, text: String)

Clears any existing text and inputs the provided text into the element matching the tag.

Link copied to clipboard
suspend fun pressBack()
Link copied to clipboard
suspend fun pressHome()
Link copied to clipboard
suspend fun relaunchApp()
Link copied to clipboard
suspend fun resolveNode(selector: Selector, requireVisible: Boolean = true): NodeSnapshot
suspend fun resolveNode(selector: String, requireVisible: Boolean = true): NodeSnapshot
Link copied to clipboard
suspend fun resolveVisibleNode(selector: Selector): NodeSnapshot
suspend fun resolveVisibleNode(selector: String): NodeSnapshot
Link copied to clipboard
suspend fun screenshot(path: String)
Link copied to clipboard
Link copied to clipboard
suspend fun scroll(selector: Selector, direction: ScrollDirection)

Performs a scroll action on the element matching the selector in the specified direction.

suspend fun scroll(tag: String, direction: ScrollDirection)

Performs a scroll action on the element matching the tag in the specified direction.

Link copied to clipboard
suspend fun takeScreenshot(hostPath: String)
Link copied to clipboard
suspend fun waitFor(selector: Selector, timeoutMs: Long = config.defaultWaitTimeoutMs)

Blocks execution until an element matching the selector becomes visible.

suspend fun waitFor(tag: String, timeoutMs: Long = config.defaultWaitTimeoutMs)

Blocks execution until an element matching the tag becomes visible.