Scenario gallery
The four scenarios shipped with Diwall: what each does, the exact command, and the output it actually produced.
A scenario is a JSON file: a list of actions, in order. It is Diwall’s unit of work — you will write some, reuse some, and put them under version control.
These four ship with the tool. They work on a fresh installation, with no prior configuration, except the last one — which needs an encrypted directory.
1 · Read without capturing
The lightest one. It waits for the page, then reads its title — no screenshot, no image analysis.
{"url": "https://example.com",
"actions": [
{"type": "attendre_selecteur_present", "selecteur": "body"},
{"type": "evaluer", "script": "document.title"}]}
diwall-rpa --scenario /opt/diwall/scenarios/exemples/sondage_fast.json --guide-version 1.3
{"succes": true, "http_status": 200,
"evaluations": [{"script": "document.title", "valeur": "Example Domain"}],
"respect": {"actions_executees": 2, "duree_totale_ms": 1174}}
Two actions, just over a second. This is the shape to reach for when you only need to know what a page says.
2 · See, then click by number
Same page, but with --som: every interactive element is numbered, and the
click names a number rather than a selector.
{"actions": [
{"type": "attendre_selecteur_present", "selecteur": "body"},
{"type": "cliquer_som", "id": 1}]}
diwall-rpa --scenario /opt/diwall/scenarios/exemples/navigation_som.json --som --guide-version 1.3
{"succes": true, "http_status": 200,
"respect": {"actions_executees": 2, "duree_totale_ms": 1160}}
3 · Diagnose a page that resists
Same skeleton, different purpose: point it at a local interface that misbehaves
and read erreurs_js and erreurs_console in the answer. A blank page with a
silent HTTP 500 behind it looks exactly like an expired session — the console
is what tells them apart.
diwall-rpa --scenario /opt/diwall/scenarios/exemples/depannage_local.json --guide-version 1.3
{"succes": true, "http_status": 200, "erreurs_js": [], "erreurs_console": [],
"evaluations": [{"script": "document.title", "valeur": "Example Domain"}]}
Empty lists here, because example.com has nothing to report. Substitute your
own URL and they fill up.
4 · Authenticate from the encrypted directory
The most demonstrative, and the one that closes the page rather than opening it: it needs a mounted, configured encrypted directory.
{"auth_indicator": ".user-menu",
"actions": [
{"type": "evaluer", "script": "document.title", "contient": "Example"},
{"type": "remplir", "selecteur": "input[name=\"username\"]",
"valeur": "depuis_secrets", "secret_cle": "username"},
{"type": "remplir", "selecteur": "input[name=\"password\"]",
"valeur": "depuis_secrets", "secret_cle": "password"},
{"type": "cliquer", "selecteur": "button[type=\"submit\"]"},
{"type": "attendre_selecteur_present", "selecteur": ".user-menu"}]}
No output is shown here, and that is deliberate: without that directory this scenario does not run, and printing the error it raises would prove nothing about the feature. Set one up first, then run it against a target of your own.
Two details carry the whole security model. "valeur": "depuis_secrets" means
the password is resolved inside the browser process, never in your shell. And
the first action is an assertion, not a step: if the page is not the one
expected, the scenario stops before typing anything anywhere.
The gallery grows from real use
Four scenarios is a deliberately modest starting point. journal.py --exporter-skill turns a successful real run into a reusable scenario — the
gallery grows at the pace of actual usage, never with examples invented to
fill the page.