Add Maestro-style YAML flow runner for deterministic automation
New --flow mode executes scripted YAML steps without LLM, mapping 17 commands (tap, type, swipe, scroll, etc.) to existing actions. Element finding uses accessibility tree text/hint/id matching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
8
examples/flows/clear-notifications.yaml
Normal file
8
examples/flows/clear-notifications.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
name: Clear Notifications
|
||||
---
|
||||
- shell: "cmd statusbar expand-notifications"
|
||||
- wait: 2
|
||||
- tap: "Clear all"
|
||||
- wait: 1
|
||||
- home
|
||||
- done: "Notifications cleared"
|
||||
16
examples/flows/create-contact.yaml
Normal file
16
examples/flows/create-contact.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
appId: com.google.android.contacts
|
||||
name: Create Contact
|
||||
---
|
||||
- launchApp
|
||||
- wait: 2
|
||||
- tap: "Create new contact"
|
||||
- wait: 1
|
||||
- tap: "First name"
|
||||
- type: "John"
|
||||
- tap: "Last name"
|
||||
- type: "Snow"
|
||||
- tap: "Phone"
|
||||
- type: "5551234567"
|
||||
- tap: "Save"
|
||||
- wait: 2
|
||||
- done: "Contact created"
|
||||
10
examples/flows/google-search.yaml
Normal file
10
examples/flows/google-search.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
appId: com.google.android.googlequicksearchbox
|
||||
name: Google Search
|
||||
---
|
||||
- launchApp
|
||||
- wait: 2
|
||||
- tap: "Search"
|
||||
- type: "weather today"
|
||||
- enter
|
||||
- wait: 3
|
||||
- done: "Search results loaded"
|
||||
14
examples/flows/send-whatsapp.yaml
Normal file
14
examples/flows/send-whatsapp.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
appId: com.whatsapp
|
||||
name: Send WhatsApp Message
|
||||
---
|
||||
- home
|
||||
- wait: 1
|
||||
- launchApp
|
||||
- wait: 2
|
||||
- tap: "Vi"
|
||||
- wait: 1
|
||||
- tap: "Message"
|
||||
- type: "hello from Droidclaw"
|
||||
- tap: "Send"
|
||||
- wait: 1
|
||||
- done: "Message sent"
|
||||
7
examples/flows/toggle-wifi.yaml
Normal file
7
examples/flows/toggle-wifi.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
name: Toggle WiFi
|
||||
---
|
||||
- settings: "wifi"
|
||||
- wait: 2
|
||||
- tap: "Wi-Fi"
|
||||
- wait: 1
|
||||
- done: "WiFi toggled"
|
||||
10
examples/send-whatsapp-vi.json
Normal file
10
examples/send-whatsapp-vi.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "Send WhatsApp to Vi",
|
||||
"steps": [
|
||||
{
|
||||
"app": "com.whatsapp",
|
||||
"goal": "You are on WhatsApp. First check if 'Vi' is visible in the chat list. If it is, tap on it directly. If not, use the Search bar to search for 'Vi' and then tap the result. Once inside the Vi chat, type 'hello from Droidclaw' in the message field and send it.",
|
||||
"maxSteps": 12
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user