A desktop automation can pass in a demo and still fail on a real workstation. Fixed delays, small layout changes, and retries that repeat the wrong action are common reasons. Before shipping a flow, test the situations that prove it can stop safely.
1. The normal screen
Run the flow when the expected window and control are already visible. Confirm that it recognizes the right app and takes only the intended action. If more than one similar window can be open, make the target selection explicit.
2. The slow screen
Delay the application or test on a slower machine. A hard-coded sleep may end too early. Wait for an observable condition, such as a button becoming enabled or a status changing, and use a deadline so the workflow cannot wait forever.
3. The missing screen
Make the target unavailable. The flow should report “not found” or enter a review path. It should not click a nearby control just because its timer expired. This failure case deserves the same attention as the happy path.
4. The changed layout
Resize the window, change display scaling, or use a different theme. Accessibility identifiers and text can be more stable than pixel positions when the app exposes them. Image matching can be useful, but test its limits across the environments you support.
5. The uncertain result
Interrupt the action or remove the expected confirmation. Before retrying, check whether the first attempt already changed the application. Otherwise, a second click may submit a form twice, create a duplicate, or update the wrong item.
A practical preflight asks three questions at every risky step:
- What evidence says it is safe to continue?
- What happens when that evidence does not appear by the deadline?
- How will the flow verify the action succeeded?
Use test data first and keep consequential decisions reviewable. Desktop interfaces change, visual matches can be ambiguous, and a passing test does not guarantee every future layout will behave the same way.
Macro8n is a local-first visual workflow editor for desktop automation. Its branches make it easier to show both “found” and “not found” outcomes before a flow reaches real work. The principle applies to any automation stack: test the failure path before trusting the happy path.
What failure case has caught your desktop workflow in production?
Top comments (2)
Your fifth test treats “I don’t know what happened” differently from “it failed.” How would you rate a workflow that avoids a second click but still doesn’t tell the user whether the first one worked?
The fifth test is the whole article. Everything else is setup for the moment you cannot tell if the first try already ran.