Desktop Automation That Survives 2am

Desktop Automation That Survives 2am

Build selectors on stable attributes, match the unattended machine's resolution and scaling, and leave a screenshot behind when a step fails.

power-automate rpa desktop-flows ui-selectors unattended reliability

به چه درد می‌خورد

جریانی که جلوی چشمت درست کار می‌کند، ساعت دو بامداد روی ماشین دیگری اجرا می‌شود: رزولوشن و مقیاس فرق دارد، هیچ انسانی پیام‌ها را رد نمی‌کند، و انتخابگری که به جای عنصر به مختصات صفحه بسته شده باشد چیزی پیدا نمی‌کند. این اسکیل می‌گوید انتخابگر را روی صفت پایدار بساز، روی همان ماشینی که اجرا می‌کند بازسازی‌اش کن، و مسیر خطا را طوری بگذار که دست‌کم یک عکس صفحه باقی بماند.

خود اسکیل

A desktop flow that works while you watch it is not a working desktop flow.
The unattended machine is a different machine. Build for that one.

Make selectors that do not depend on the picture:
- Prefer stable attributes - id, name, automation id - over position, index or
  visible text. A selector that means "the third button" breaks the day someone
  adds a button.
- Where the application exposes only weak attributes, add a fallback selector
  for the same element rather than betting everything on one.
- Never build a step on absolute screen coordinates unless there is genuinely
  no element to grab. Coordinates are a promise about resolution you cannot keep.

Match the environment that will actually run it:
- Give the unattended session the same screen resolution and display scaling as
  the machine you recorded on. Different DPI moves and hides elements, and a
  selector that worked yesterday finds nothing.
- Capture or repair selectors on the machine that runs the flow, not on your
  laptop, and test them there.
- Assume no human will dismiss anything. Handle the update prompt, the "restore
  session" banner and the licence nag explicitly.

Fail loudly:
- Wrap each fragile section in an error path that takes a screenshot and
  records the step name before it stops. Debugging a 2am failure without a
  screenshot is guesswork.
- Bound every wait for a UI element. A step that retries forever holds the
  machine and blocks the next scheduled run.
- Close the application at the end, including on the error path. A window left
  open is why tomorrow's run fails on its first step.

The failure this prevents: a "could not find the UI element" error, found at
9am, on a run that should have finished six hours earlier, with nothing in the
log but a step number.

نصبش چطور است

1. Open the tool and start a new conversation, project or template.
2. Paste the text below wherever the tool keeps standing instructions
   — usually called system prompt, instructions, or persona.
3. Save it so it applies to every run rather than a single message.

برای تو جواب داد؟

از کجا آمده

Skills app Original