All posts

Automate Repetitive Data Entry with Phoma’s Visual Flow Builder

Automate Repetitive Data Entry with Phoma’s Visual Flow Builder

Introduction

Manual data entry is a time‑drain and a common source of typos, duplicates, and missed deadlines. Whether you are a QA tester validating app inputs, a small‑business owner syncing daily sales, or an operations team feeding data into a CRM, repeating the same taps, swipes, and text‑inputs every day adds up quickly. Phoma’s visual flow builder lets you capture those actions once and replay them on any Android device, even across a fleet of phones, without writing a line of code. In this guide we’ll walk through a complete, real‑world example of automating repetitive data entry, explain why each step matters, and give you concrete instructions you can copy‑paste into Phoma.

Why Automate Data Entry?

  • Speed & Consistency – A single tap can fill an entire form, eliminating the human factor that causes missed fields.
  • Error Reduction – Automated typing respects exact formatting (e.g., dates, phone numbers) and avoids copy‑paste mistakes.
  • Scalability – One flow can run on a single device or dozens, keeping data entry uniform across your team.
  • Auditability – Every step is recorded, making it easy to review, debug, and prove compliance.

Connect Your Phone to Phoma

Before you can interact with an app you need a stable connection.

USB Debugging

  1. Enable Developer options on the Android device (Settings → About phone → Build number → tap 7×).
  2. Open Developer options and turn on USB debugging.
  3. Connect the phone to your Windows PC with a USB cable.
  4. In Phoma, click Add Device → USB and select your device from the list. Phoma will install the necessary drivers automatically.

Wireless (ADB Pairing)

  1. Keep USB debugging enabled.
  2. On the same Wi‑Fi network, open a terminal and run adb pair <phone_ip> 12345. Phoma will show a pairing code; enter it on the phone.
  3. In Phoma choose Wireless → Add wireless device, scan the QR code, and the connection is established.

Tip: Always verify the connection by mirroring the screen (scrcpy is built‑in to Phoma). If you see the device’s screen, you’re ready to build the flow.

Inspect the App’s UI Hierarchy

To create reliable selectors you need to read the element tree of the target app.

  1. In Phoma, open the Inspect mode for the connected device.
  2. Navigate to the app you want to automate (e.g., a CRM).
  3. Tap an element (EditText, Button, ListView) and Phoma displays its resource‑id, class, text, and bounds.

Example Selector (CRM Login Screen)

// Username field
resourceId="com.example.crm:id/et_username"
className="android.widget.EditText"
text=""

// Password field
resourceId="com.example.crm:id/et_password"
className="android.widget.EditText"
text=""

// Login button
resourceId="com.example.crm:id/btn_login"
className="android.widget.Button"
text="SIGN IN"

Choosing the resource‑id is usually the safest because it survives language changes, but if an app lacks an id you can fall back to class + text or content‑desc.

Build the Flow Step‑by‑Step

Phoma’s flow editor works like a drag‑and‑drop timeline. Below is a concrete example that copies a contact from the device’s Contacts app into a CRM.

1️⃣ Open Contacts App

  • Action: Launch App → select com.android.contacts
  • Wait: Wait for element with resourceId="com.android.contacts:id/search_bar"

2️⃣ Locate a Specific Contact

  • Action: Tap on resourceId="com.android.contacts:id/contact_name" (e.g., “John Doe”)
  • Action: Copy Text → store in variable {contact_name}
  • Action: Copy Text → store in variable {contact_phone} (from resourceId="com.android.contacts:id/phone_number")

3️⃣ Switch to CRM

  • Action: Switch to recent app → select com.example.crm
  • Wait: Wait for element with resourceId="com.example.crm:id/et_name"

4️⃣ Fill CRM Fields

  • Action: Type Text into resourceId="com.example.crm:id/et_name" using {contact_name}
  • Action: Type Text into resourceId="com.example.crm:id/et_phone" using {contact_phone}
  • Action: Tap on resourceId="com.example.crm:id/btn_save"

5️⃣ Verify Entry

  • Action: Take Screenshot
  • Action: Read Text from resourceId="com.example.crm:id/tv_confirmation"
  • Action: Assert Text Contains "{contact_name}"

The flow can be saved with a descriptive name (e.g., Import Contact – v1) and reused whenever you need to bulk‑import contacts.

Real‑World Scenario: Daily Order Entry for a Small Business

Imagine a shop that records each day’s sales in an internal Android app called ShopKeeper. The same three fields (date, total amount, notes) are entered every morning.

Flow Outline

  1. Open ShopKeeper (Launch App → com.shopkeeper.app)
  2. Tap "Add Order” (resourceId="com.shopkeeper.app:id/btn_add")
  3. Select Date (resourceId="com.shopkeeper.app:id/spinner_date" → tap today’s option)
  4. Enter Amount (resourceId="com.shopkeeper.app:id/et_amount" → type {daily_total})
  5. Enter Notes (resourceId="com.shopkeeper.app:id/et_notes" → type {daily_notes})
  6. Save (resourceId="com.shopkeeper.app:id/btn_save")
  7. Screenshot for audit trail

Element Selector Example

// Date spinner
resourceId="com.shopkeeper.app:id/spinner_date"
className="android.widget.Spinner"

// Amount EditText
resourceId="com.shopkeeper.app:id/et_amount"
className="android.widget.EditText"

// Notes EditText
resourceId="com.shopkeeper.app:id/et_notes"
className="android.widget.EditText"

// Save button
resourceId="com.shopkeeper.app:id/btn_save"
className="android.widget.Button"
text="SAVE"

Running the Flow on Multiple Devices

  • In Phoma, open the Flows tab, select the Daily Order Entry flow, then click Run on Multiple Devices.
  • Choose the list of phones you want (you can import a CSV with serial numbers).
  • Phoma will open each device, mirror the screen, and execute the steps sequentially, pausing between devices for a few seconds.

Describing Tasks to the AI Assistant

Phoma includes an optional AI agent that can convert a plain‑language description into a visual flow. While the AI is not included in any paid plan, you can run it locally using your own API key.

Example prompt:

"Import today’s sales data from the clipboard into the ShopKeeper app on each connected device. The clipboard contains three values: date, amount, and notes. The app fields are identified by resource IDs et_date, et_amount, and et_notes. After filling, tap the save button and capture a screenshot."

The AI returns a JSON representation of actions. You can paste that JSON into Phoma’s Import Flow dialog, and Phoma will render the steps on the timeline for you to edit or run directly.

Testing and Validation

Even a visual flow needs verification:

  • Screenshots after each major step help you see if the UI updated as expected.
  • Read Text actions let you capture dynamic content (e.g., a confirmation toast) and assert its presence.
  • Condition nodes (If/Else) let you branch based on text or element presence, ensuring the flow behaves correctly when data is missing.

Assertion Example

// After saving a contact
Read Text from resourceId="com.example.crm:id/tv_success"
Assert Text Contains "Contact saved"

If the assertion fails, Phoma highlights the step and you can inspect the screenshot to see why the flow deviated (e.g., a changed resource‑id after an app update).

Troubleshooting Common Issues

Symptom Likely Cause Fix
Phone does not appear in Phoma USB debugging disabled or driver missing Re‑enable debugging, reinstall Windows ADB drivers, try a different USB cable
Selector no longer works after an app update Resource‑id changed Re‑inspect the updated UI and update the selector in the flow
Flow stops mid‑execution Element not found within timeout Increase Wait for element timeout or add a Sleep node before the step
Screen mirror freezes High latency on Wi‑Fi Switch to USB connection or use a 5 GHz network

If you encounter a persistent issue, open the device’s Logcat from within Phoma (Developer options → Enable “USB debugging (Phoma)” ) to see raw Android messages.

Summary

Automating repetitive data entry is a high‑impact use case that saves time, reduces errors, and scales across any number of Android devices. Phoma’s visual flow builder makes it possible to capture actions once—using reliable element selectors obtained through the built‑in inspector—and replay them on a single phone or an entire fleet. By following the step‑by‑step example of importing contacts into a CRM (and the daily order entry scenario), you can start building flows that handle everyday data tasks with the same reliability as a scripted test suite. Remember to validate each flow with screenshots and assertions, keep selectors up‑to‑date after app changes, and leverage Phoma’s AI assistant to accelerate flow creation. With these practices, your team can focus on higher‑value work while Phoma handles the repetitive typing, tapping, and validation behind the scenes.