olef record
Generated from Olef 3.0.2. All commands · Capabilities and requirements
These entries describe available commands, not a sequence to run. Check prerequisites before changing app, device, or cloud state. Global options are listed in the command catalog.
olef record
Section titled “olef record”Turn what was done in a session (an agent’s commands, a person’s viewer input) into a test folder: record save <name> cleans up the journal, writes a Bash script of one olef command per step, replays it once from a fresh start, and saves tests/olef/<name>/
olef record --helpOutput: json.
olef record start
Section titled “olef record start”Start a recording in this session, optionally from a fresh start (--app P --clear-data --launch): what follows becomes the test. The viewer’s Record button runs this
olef record start --helpOutput: json.
| Argument | Description |
|---|---|
--app <PACKAGE> |
The app the test is for (default: the session’s app, else the app in front) |
--clear-data |
Clear the app’s data first, so the recording starts where the test will |
--launch <ACTIVITY> |
Launch the app first, optionally at this activity (.MainActivity) |
--expect-text <TEXT> |
With –launch: wait until this text is on screen |
--expect-rid <RESOURCE_ID> |
With –launch: wait until this resource id or test tag is on screen |
--json |
Accepted for compatibility; output is always JSON. |
Examples from the CLI (replace sample packages, selectors, and paths with your own):
olef record start --app io.github.andriyo.shadowdroid.sample --clear-data --launch .MainActivity --expect-rid status_textolef record stop
Section titled “olef record stop”Stop the recording; keeps the screen it ended on (the last step’s checks are read against it). record save then makes the test
olef record stop --helpOutput: json.
| Argument | Description |
|---|---|
--json |
Accepted for compatibility; output is always JSON. |
olef record save
Section titled “olef record save”Clean up the recording, compile it into a test folder, replay it once from a fresh start (putting back any step removed by mistake), and write tests/olef/<NAME>/ (test.sh, screens/, README.md, recording.json, and responses/ + expect/ when the proxy captured the flow). Works on the whole session when no recording was started
olef record save --helpOutput: json.
| Argument | Description |
|---|---|
<name> |
Required. The test’s name (folder name): letters, digits, - and _ |
--out <DIR> / -o |
The test folder (default: <tests.dir>/<NAME>, tests/olef/<NAME>) |
--from <MARK> |
Start at this record mark |
--to <MARK> |
End at this record mark |
--last <N> |
Only the last N commands |
--journal <DIR> |
Read this session folder’s journal instead of the current session’s (a closed session, or one left by a script) |
--no-verify |
Skip the replay check: write the folder as compiled |
--force |
Replace an existing test folder’s generated files (mocks/, data/ and other files are kept) |
--json |
Accepted for compatibility; output is always JSON. |
Examples from the CLI (replace sample packages, selectors, and paths with your own):
olef record save mission_recoveryolef record save checkout --from cart-ready --no-verifyolef record save login --to logged-in -o tests/olef/loginolef record status
Section titled “olef record status”Whether a recording is on, and how much it holds
olef record status --helpOutput: json.
| Argument | Description |
|---|---|
--json |
Accepted for compatibility; output is always JSON. |
olef record show
Section titled “olef record show”The recording as it would be saved: each step as its script line, what clean-up would remove and why, and the script. Changes nothing
olef record show --helpOutput: json.
| Argument | Description |
|---|---|
--from <MARK> |
Start at this record mark |
--to <MARK> |
End at this record mark |
--last <N> |
Only the last N commands |
--journal <DIR> |
Read this session folder’s journal instead of the current session’s (a closed session, or one left by a script) |
--json |
Accepted for compatibility; output is always JSON. |
olef record step
Section titled “olef record step”Name the commands that follow (a step of the test): record step "pay with the saved card" becomes step pay-with-the-saved-card
olef record step --helpOutput: json.
| Argument | Description |
|---|---|
<name> |
Required. What the following commands do |
--json |
Accepted for compatibility; output is always JSON. |
Examples from the CLI (replace sample packages, selectors, and paths with your own):
olef record step "pay with the saved card"olef record mark
Section titled “olef record mark”Name the current point (logged-in), for record save --from/--to
olef record mark --helpOutput: json.
| Argument | Description |
|---|---|
<name> |
Required. |
--json |
Accepted for compatibility; output is always JSON. |
olef record check
Section titled “olef record check”Add a check at this point (it must hold now), written into the test as a ui wait marked # checked by you
olef record check --helpOutput: json.
| Argument | Description |
|---|---|
--text <TEXT> |
Match text by case-insensitive substring. Single-target actions prefer a unique full-text match; multiple remaining matches are ambiguous |
--rid <RID> |
Match by resource-id substring; actions prefer a unique exact match |
--desc <DESC> |
Match by content-description substring; actions prefer a unique exact match |
--has-text <TEXT> |
The element shows this text (its own, its description, or inside it) |
--checked <BOOL> |
The element is checked (false: unchecked) Values: true, false. |
--selected <BOOL> |
The element is selected (false: not selected) Values: true, false. |
--enabled <BOOL> |
The element is enabled (false: disabled) Values: true, false. |
--gone |
The element is gone |
--json |
Accepted for compatibility; output is always JSON. |
Examples from the CLI (replace sample packages, selectors, and paths with your own):
olef record check --rid status_text --has-text claimedolef record check --rid mission_telemetry_switch --checkedolef record discard
Section titled “olef record discard”Forget the recording so far: record save starts from here
olef record discard --helpOutput: json.
| Argument | Description |
|---|---|
--json |
Accepted for compatibility; output is always JSON. |