Skip to content

Reference ​

Reference for Astra Scout commands, selectors, and workspace configuration.

Astra Scout runs Maestro flow YAML on iOS Simulators, real iPhones and Android devices, using the maestro-runner engine. This reference covers the commands, selectors and workspace configuration the runner supports. The YAML syntax is identical to Maestro, so existing flows work unchanged, provided they stay within what is listed here.

Explore the reference ​

SectionWhat you will find
CommandsEvery flow command that Astra Scout supports, with parameters and examples.
SelectorsHow to target UI elements by text, ID, position, state and size.
Workspace configurationThe config.yaml keys that choose and order the flows of a run.

To learn how to write and organize flows, start from the flows guides.

Commands ​

Support levels:

  • Supported: works on both Android and iOS as documented.
  • Partial: works with limits, for example on one platform only or on iOS Simulators only. The page starts with a caveat box that lists them.

"Simulator only" means the command works on iOS Simulators and fails on a real iPhone.

CommandDescriptionAndroidiOSSupport
acceptAlertAccept a system alert dialog on iOS.NoYesPartial
addMediaAdd images or videos to the device gallery for media picker testing.YesSimulator onlyPartial
assertConditionAssert that a visibility or script condition holds.YesYesSupported
assertDarkModeAssert that the device is currently in dark mode.YesSimulator onlyPartial
assertEventsAssert that the app sent analytics events (Astra Scout only).YesYesSupported
assertLightModeAssert that the device is currently in light mode.YesSimulator onlyPartial
assertNotVisibleAssert that a UI element is not present or visible on the screen.YesYesSupported
assertNoDefectsWithAIAI check that the screen has no visual defects. Needs an AI CLI configured in Settings.YesYesSupported
assertScreenshotPerform visual regression testing of your application against existing screenshots.YesYesSupported
assertTrueAssert that a JavaScript expression evaluates to true.YesYesSupported
assertWithAIAssert a natural language statement about the screen with AI. Needs an AI CLI configured in Settings.YesYesSupported
assertVisibleAssert that a UI element is visible on screen with automatic retry.YesYesSupported
backPress the system back button to navigate to the previous screen.YesNoPartial
clearKeychainClear iOS keychain data for the app under test.NoSimulator onlyPartial
clearStateClear app data, cache, and preferences to reset to fresh install state.YesYesSupported
copyTextFromCopy text content from a UI element to clipboard or variable.YesYesSupported
defineVariablesDefine flow variables from key-value pairs.YesYesSupported
dismissAlertDismiss a system alert dialog on iOS.NoYesPartial
doubleTapOnPerform a double-tap gesture on a UI element or screen coordinates.YesYesSupported
dragAndDropPress an element or point and drag it to another element or point.Yes (Android 12+)YesPartial
eraseTextDelete text from input fields by character count or clear entirely.YesYesSupported
evalScriptEvaluate inline JavaScript expressions within the flow context.YesYesSupported
evalWebViewScriptRun JavaScript in the WebView on screen.YesNoPartial
extendedWaitUntilWait for an element with a custom timeout longer than the default.YesYesSupported
extractTextWithAIRead text from the screen with AI into a variable. Needs an AI CLI configured in Settings.YesYesSupported
hideKeyboardDismiss the on-screen keyboard if currently visible.YesYesSupported
inputRandomType random data of a chosen type into the focused field.YesYesSupported
inputRandomEmailType a random e-mail address.YesYesSupported
inputRandomNumberType a random string of digits.YesYesSupported
inputRandomPersonNameType a random person name.YesYesSupported
inputRandomTextType a random string of letters and digits.YesYesSupported
inputTextType text into focused input fields with optional keyboard handling.YesYesSupported
killAppForce stop an app and optionally clear all its data and cache.YesYesSupported
launchAppLaunch an app with optional permission configuration and clear state.YesYesSupported
longPressOnLong press on elements for context menus or drag-and-drop operations.YesYesSupported
openBrowserOpen a URL in the device's browser.YesYesSupported
openLinkOpen a URL or deep link in the app or system browser.YesYesSupported
openNotificationsPull down the notification shade on Android.YesNoPartial
pasteTextPaste text from clipboard into the currently focused input field.YesAfter copyTextFrom onlyPartial
pressKeyPress hardware keys like home, back, enter, or volume buttons.YesLimited keysPartial
removeMediaClear the media index on Android, undoing addMedia.YesNoPartial
repeatRepeat a block of commands a specified number of times.YesYesSupported
retryRetry a block of commands on failure with configurable attempts.YesYesSupported
runFlowExecute a subflow file with optional environment variables.YesYesSupported
runScriptRun an external JavaScript file and capture its output.YesYesSupported
runShellRun a shell command on the Mac and optionally keep its output.YesYesSupported
runWebViewScriptRun a JavaScript file in the WebView on screen.YesNoPartial
scrollA simple vertical scroll to move down the screen to see the content below.YesYesSupported
scrollUntilVisibleAutomatically scroll until a target element becomes visible on screen.YesYesSupported
setAirplaneModeEnable airplane mode to test offline behavior.YesNo effect on SimulatorPartial
setClipboardSet the device clipboard content to a specified text value.YesNoPartial
setDarkModeEnable or disable dark mode to test light/dark UI behavior.YesSimulator onlyPartial
setLocationSet device GPS location to specific coordinates for location testing.YesSimulator onlyPartial
setOrientationChange device orientation between portrait and landscape modes.YesYesSupported
setPermissionsGrant or deny app permissions during flow execution.YesPartial on real iPhonePartial
startRecordingStart recording the screen for video documentation of test runs.YesNoPartial
stopAppStop a running app without clearing its data or state.YesYesSupported
stopRecordingStop the current screen recording and save the video file.YesNoPartial
swipeSwipe gestures in any direction with customizable speed and distance.YesYesSupported
takeScreenshotCapture a screenshot and save it to the test output directory.YesYesSupported
tapOnTap on UI elements by text, ID, or coordinates with optional repeat and delay.YesYesSupported
tapOnPointTap or press at a screen coordinate.YesYesSupported
toggleAirplaneModeToggle airplane mode on or off during test execution.YesNo effect on SimulatorPartial
toggleDarkModeToggle dark mode on or off during test execution.YesSimulator onlyPartial
travelSimulate time travel by adjusting the device system clock.YesNoPartial
waitPause the flow for a fixed time.YesYesSupported
waitForAnimationToEndWait for UI animations to complete before proceeding.YesYesSupported

Not supported in Astra Scout ​

All Maestro commands that have a page in this reference are supported. The three AI commands (assertWithAI, assertNoDefectsWithAI and extractTextWithAI) run through the AI CLI you configure in Settings → AI, see the AI assistant.

Maestro features that belong to Maestro Cloud or Maestro Studio (cloud uploads, notifications, hosted devices) are also out of scope, because Astra Scout runs fully locally without login.