Package-level declarations

Types

Link copied to clipboard
class AndroidOperationExecutor(useUnmergedTree: () -> Boolean? = null) : OperationExecutor
Link copied to clipboard
class CommandQueue(scope: CoroutineScope)

Очередь команд для последовательного выполнения операций с UI. Гарантирует, что команды не будут конкурировать друг с другом. WebSocket команды имеют приоритет над операциями получения дерева. Команды сами управляют переключением потоков внутри себя.

Link copied to clipboard
class ComposeOperationExecutor(useUnmergedTree: () -> Boolean? = null)
Link copied to clipboard
Link copied to clipboard
class FingerprintStabilityIdleWaiter(pollIntervalMs: Long = 100, fingerprint: () -> String?) : UiIdleWaiter

Универсальный fallback: UI считается успокоившимся, когда fingerprint дерева стабилен два замера подряд. Используется там, где нет доступа к нативному idle-механизму платформы (см. design post-action-ui-tree, Open Questions).

Link copied to clipboard
class IosOperationExecutor(useUnmergedTree: () -> Boolean? = null) : OperationExecutor
Link copied to clipboard
class JvmOperationExecutor(useUnmergedTree: () -> Boolean? = null) : OperationExecutor
Link copied to clipboard

Платформы без idle-детекта (iOS): дерево снимается сразу, settled = true.

Link copied to clipboard
Link copied to clipboard
sealed class QueuedCommand

Типы команд, которые могут быть выполнены через очередь

Link copied to clipboard

Интерфейс WebSocket клиента для передачи UI данных на recorder server

Link copied to clipboard
Link copied to clipboard
fun interface UiIdleWaiter

Ожидание «успокоения» UI после мутирующей команды (capability post-action-tree-delivery).

Link copied to clipboard
Link copied to clipboard

Builder for constructing ViewUiElement tree from Android View hierarchy

Functions

Link copied to clipboard
fun SemanticsMatcher.assertDisplayedTextEquals(vararg expected: String): UltronComposeSemanticsNodeInteraction
fun UltronComposeListItem.assertDisplayedTextEquals(vararg expected: String): UltronComposeListItem
fun UltronComposeSemanticsNodeInteraction.assertDisplayedTextEquals(vararg expected: String): UltronComposeSemanticsNodeInteraction
Link copied to clipboard
fun SemanticsMatcher.assertEditableValueEquals(expected: String): UltronComposeSemanticsNodeInteraction
fun UltronComposeListItem.assertEditableValueEquals(expected: String): UltronComposeListItem
fun UltronComposeSemanticsNodeInteraction.assertEditableValueEquals(expected: String): UltronComposeSemanticsNodeInteraction
Link copied to clipboard
fun UltronUiObject2.doubleClick(): UltronUiObject2
Link copied to clipboard
fun hasBounds(left: Double, top: Double, right: Double, bottom: Double): SemanticsMatcher
Link copied to clipboard
Link copied to clipboard

Compose Test has no public hasRole matcher, so derived role locators (ai.assertum.recordercore.models.locator.ComposeLocator.RoleLocator) cannot use a built-in. This helper builds the matcher from the Role semantics property and is imported both by generated ScreenObject code and the runtime ComposeOperationExecutor.

Link copied to clipboard
fun UiElement.printTree(indent: String = ""): String

Extension function to print tree structure for debugging Работает с полиморфным деревом UiElement

Link copied to clipboard
Link copied to clipboard
fun runDesktopRecorderSession(composeUiTest: ComposeUiTest, port: Int = 9095, deviceId: String = "desktop-undertest", streamingIntervalMs: Long = 300, useUnmergedTree: Boolean = true, keepRunning: () -> Boolean = { true })

Single-threaded desktop recorder session. Unlike CMPRecorderWebSocketClient (which streams from a background thread), this runs the main loop on the caller's thread — the Compose test thread of runComposeUiTest { }. Tree reads, screenshot capture and command execution (Ultron actions) all happen on the test thread, where Compose actions actually complete; only websocket I/O is moved to a background coroutine via lock-free queues.

Link copied to clipboard
fun runRecorder(port: Int = 9095, streamingInterval: Duration = 300.milliseconds, deviceId: String = "test-device-001"): Nothing
Link copied to clipboard
fun runRecorderClient(port: Int = 9095, streamingInterval: Duration = 300.milliseconds, deviceId: String = "test-device-001"): RecorderWebSocketClient
Link copied to clipboard
fun runRecorderClientBlocking(port: Int = 9095, streamingInterval: Duration = 1.seconds, deviceId: String = "test-device-001", durationSeconds: Long = 30)
Link copied to clipboard
suspend fun runRecorderClientUntilCancelled(port: Int = 9095, streamingInterval: Duration = 300.milliseconds, deviceId: String = "test-device-001"): Nothing
Link copied to clipboard
Link copied to clipboard
suspend fun testConnection(port: Int = 9095, host: String = "localhost"): Boolean
Link copied to clipboard
fun UiAutomatorLocator.toBySelector(): BySelector

Converts UiAutomatorLocator (serializable, KMP) to Android BySelector for execution.

Link copied to clipboard
fun withViewBounds(left: Double, top: Double, right: Double, bottom: Double): Matcher<View>