For Shirates users

in Japanese(日本語)

fleetest's Swift DSL follows Shirates (Classic) conventions. Command names, argument names, defaults, and behavior are carried over in principle. Some things are named differently (see the tables below) and some, such as nicknames, are intentionally absent, so read this page once before you switch.

This page lists, in order: what works under the same name, what is renamed, what is not present, and what only fleetest has.

Structure

Shirates fleetest
scenario / case / condition / action / expectation scenario / scene / condition / action / expectation
a UITest class a class annotated @TestClass
@Testrun a run profile (profiles/runs/<name>.json)

Same name, works as you'd expect

Category Commands
Tap / app icon tap (+holdSeconds:), tapAppIcon
Existence exist, appIs
Grabbed element lastElement
Keyboard / input pressEnter, clearInput, hideKeyboard (closes the keyboard differently on iOS), keyboardIsShown / keyboardIsNotShown
Attribute / state assertions idIs, enabledIsTrue / enabledIsFalse, checkIsON / checkIsOFF
Text / value assertions textIs / textIsNot / textContains(Not) / textStartsWith(Not) / textEndsWith(Not) / textMatches(Not) / textMatchesDateFormat / textIsEmpty / textIsNotEmpty, and the same 10-form set for valueIs…
Any-value assertions thisIs / thisIsNot / thisIsTrue / thisIsFalse / thisIsEmpty / thisIsNotEmpty / thisIsBlank / thisIsNotBlank / thisContains(Not) / thisStartsWith(Not) / thisEndsWith(Not) / thisMatches(Not) / thisMatchesDateFormat / thisIsGreaterThan(OrEqual) / thisIsLessThan(OrEqual)
Scroll scrollDown/Up/Left/Right (+repeat:), scrollToBottom/Top/RightEdge/LeftEdge (+maxSwipes:), withScrollDown/Up/Left/Right, withoutScroll, scrollFrame, startMarginRatio / endMarginRatio
Flick flickCenterToTop/Bottom/Left/Right, flickLeftToRight/RightToLeft, flickBottomToTop/TopToBottom
Swipe swipePointToPoint, swipeElementToElement
Branch ifCanSelect { }.ifElse { }, ios { } / android { }
Interrupt handling suppressHandler { } / useHandler { } / disableHandler() / enableHandler()
App control launchApp / terminateApp / restartApp / installApp / removeApp
Waiting wait / waitForDisplay / waitForClose
Recording / flow procedure, screenshot, verify, @Deleted
Before / after beforeEach / afterEach
Memo writeMemo / readMemo / clearMemo / memoTextAs (scope: one test function)
Run memo writeRunMemo / readRunMemo / clearRunMemo / runMemoTextAs
Log folder TestLog.directoryForLog

Renamed / different form

Shirates fleetest Note
dontExist notExist(sel, waitSeconds:scroll:maxSwipes:) reads more clearly as a negation of exist
sendKeys type("…") / type(sel, "…") type(sel, "…", replace: true) also folds in a clear-before-type, which Shirates does as two separate calls
pressBack back() works on both OS (iOS falls back to an edge swipe when there's no navigation bar back button)
pressHome home() works on both OS
irregularHandler { } (lambda registration) irregularHandler(sel, dismiss:, maxDismissals:) declared by selector rather than by registering a lambda; auto-dismisses an in-app modal whenever it appears
goPreviousApp appSwitcher() opens the app switcher only; it doesn't select the previous app for you
displayedIs requireVisible: argument + a run profile's fmTextVisibilityCheck / ocrTextVisibilityCheck visibility checking is a parameter on the relevant command rather than its own assertion
doUntilTrue doUntilTrue a throw in the block fails immediately (Shirates retries by default); there are no retryOnError-style arguments
select select does not fail when nothing is found (returns an empty element); use exist to guarantee presence

Not present — write it this way instead

Shirates Write it in fleetest as
Nicknames (selector / screen / dataset nicknames) selectors written directly; no indirection layer
screenIs / screenIsOf / isScreen(Of) / waitScreen(Of) / switchScreen screenLooksLike("description") (FM visual check), or exist(sel) on an element unique to that screen
dontExistImage / canFindImage / imageContains (image template matching assertions) Check the result of findImage with .isEmpty, or screenLooksLike("description") (FM visual verification). findImage* / findImages / existImage* / imageIs exist under the same names
tapWithoutScroll / existWithoutScroll / selectWithoutScroll / existImageWithoutScroll Pass scroll: .noScroll to the command (exist(sel, scroll: .noScroll)). To cancel for a whole block, use withoutScroll { }
tapWithScrollDown / existWithScrollUp / selectWithScrollLeft / findImageWithScrollDown and the like (*WithScroll*) Pass scroll: to the command (tap(sel, scroll: .down) / existImage(label, scroll: .down)). Scrolling is specified only through the scroll: argument
macro a plain Swift function, optionally marked @FTCommand("summary") to list it in the DSL command index (ft_dsl_commands) so an agent can find and reuse it — see Custom commands
manual / knownIssue not available — a failing command always aborts the scenario; there is no escape hatch to mark a failure as expected
must / should / want, SKIP / MANUAL / NOTIMPL not available — for OS-specific tests use @TestClass(platform:) / @Test(platform:) instead
Datasets: app / dataPattern not available — Swift literals or constants written directly in the scenario
Datasets: account / data implemented with the same names and arguments — see Test data and accounts
canSelect on its own wrap it in ifCanSelect { } or repeatWhileCanSelect(sel, maxLoopCount:) { }
existAll / canSelectAll / dontExistAll a chain of individual exist calls (each can have its own waitSeconds: / scroll:)
tempSelector / tempValue write the selector directly at the call site
withContext (native/web context switching) not needed — WebView content is read transparently through the same selectors and commands
swipeCenterTo* and the other swipe commands swipe(.up) etc. (one command that takes a direction)
cell / cellOf the selector scope >>
accessIs* #id
classIs the selector's .type
assertEquals thisIs
ifTrue / ifFalse / ifScreenIs / ifCheckON Swift if
shell procedure { }
describe / caption / comment / output the scene description
silent / info / warn, onScreen / onError, isAppInstalled not available
beforeAllAfterSetup setUpDevice()
setEventHandlers write it inside beforeEach()
typeChars not needed
internetOn/Off, wiFiOn/Off, mobileOn/Off not available — on iOS neither the Simulator nor a physical device can have its network cut from outside, so it cannot be written the same way on every setup. To make your own server fail, switch the test server started from compose.yaml into a failing state with httpRequest. Failures reaching external sites cannot be reproduced

Not yet present (planned)

There is no way to write these in the meantime.

Shirates Status
pressSearch, pressTab, pressKeys, pressAndroid planned
tapCenterOfScreen, tapCenterOf, tapOffset planned

fleetest-only additions

Shirates has no equivalent for these:

Command What it does
fold() / unfold() / hinge(_) folds, unfolds and sets the hinge angle of a foldable device
beforeAll / afterAll / setUpDevice / tearDownDevice before/after hooks that run once per run × class or per device × class
TestLog.directoryForTemp a temporary folder
maxGestureSeconds: an argument on gesture commands that take a duration (tap(holdSeconds:), swipe, pinch, flick, etc.); raises the default 10-second cap to at most 60 seconds for that one command
screenLooksLike("description") FM multimodal visual verification against a screenshot
countIs(sel, n) asserts the number of matching elements
scrollTo(sel, direction:, maxSwipes:) scrolls in the given direction until the selector resolves
swipeBy(sel?, dxRatio:dyRatio:) a relative drag by ratio of the target's size, diagonal included (for panning maps)
doubleTap(sel?) a genuine double-tap gesture (two separate tap calls are too slow to register as one)
pinchOut(sel?, scale:) / pinchIn(sel?, scale:) two-finger pinch zoom
gesture(sel?) { FTFinger(x:y:).move(...).hold(...) } one or more finger paths replayed as a single continuous touch that never lifts between segments — for pattern locks, long-press-then-drag, or custom multi-finger gestures
clearAppData(bundleID?) clears app data and permissions without reinstalling — for onboarding / permission-dialog tests
openURL(url) / launchApp(url:) deep-link delivery, with or without restarting the app
rotateTo(.landscape) rotates the device; the scenario restores the original orientation on completion
waitForSettle(sel?, quietSeconds:, throwsException:, waitSeconds:) waits until the pixels of the screen (or of an element's area) stop completely and the accessibility tree has caught up — for image checks or screenshots after scroll inertia has fully stopped (wait)
hold(sel, holdSeconds:) { } for parts shown only while pressed (tooltips etc.); the block runs while the finger is down (gestures)
dataFile(filename) / addMedia(filename) get the URL of a file (CSV, JSON, image) in the dataset folder / put an image or video into the photo library (fails on a physical iPhone) (dataset)
httpRequest(url, method:, headers:, body:, waitSeconds:) call an external API from inside the sandbox; 4xx/5xx are not failures, network errors and timeouts are (http_request)
tap(sel, linkText:) taps an inline link inside a paragraph by the position of the text within the element (tree descendants first, then OCR; fails if not found)
iosAlertHandler(alert:, button:) auto-dismisses iOS system alerts (permission prompts etc. — a separate process, so irregularHandler can't see them)
@Draft("reason") marks a scenario as work-in-progress; excluded from bulk runs like @Deleted, but can still be run by exact ID
group("name") { } prefixes a run of steps with a label in the report; doesn't change execution or failure handling
Typed selectors (Sel) tap(.id("login_btn").or(.text("Log In"))) — the same locators as strings, but typo'd names become compile errors
#id also matches placeholder if no element's identifier matches, #id falls back to matching the placeholder value (input fields are addressed differently depending on the platform/mode)
|| in a selector a union of candidates — tap lands on the first one found, so "#id||Label" reads as "prefer the id, fall back to the label"