Start your own scalable robot automation.

Robotic automation mimics the human workers with consistent quality and much higher production. Improvising or change in few lines of software code is always faster and cheaper than retraining hundreds of employees.

A robot that can draw!

Robotic automation promises to achieve the following goals.

This post aims to provide understandings of good practices to build an automation pipeline, using the open-source library, PyAutoGUI. To learn, we will make automation to draw a diagram on MS-Paint. The diagram needs to be highly symmetrical which would be difficult to be drawn by a human.

Let’s understand the trade-off first. While designing a resilient system we should also consider the weakness of robots. Robot lacks the IQ as compared to humans. They lack the judgment to react to unseen scenarios. We need to assume that you are giving instructions to that no IQ bot sitting in front of the computer.

Bots don’t know how to deal with an unknown scenario. They don’t even know if they did something wrong.

RPA in action: Drawing symmetrical shape in MS-Paint.

Good practice to design an RPA (robotic process automation)

Task Design

Deterministic UI interactions

Consume UI feedback

RPA.hotkey(('ctrl', 's'))
# Bad practise: since task can take more than 120 seconds.
time.sleep(120)
# Good practise: time.sleep till active window gets "Save As"
RPA.waitForWindow(title="Save As")

RPA.typewrite("101010.png")
RPA.hotkey(('alt', 's'))
Saving generated file

Consider external factors

Have a comprehensive list of all factors which can affect automation. Make sure the structure has agility for the following factors.

Project Structure

Connecting with a scalable architecture

The automation tasks are demanding for time and resources. We need the pool of independent VMs self-distributing load to achieve maximum productivity. Each Window VM should be responsible to consume the next task from the queue.

Horizontally scalable worker pool

I would recommend starting the RPA project on an open-source library, get a rigid understanding of the feasibility and expectation. Avoid getting dependent on 3rd party vendors like UI-path without having the metric goals.

Read about the resource and code as:

Code, arts, process and aspirations. co-Founded GreedyGame | IIT Ropar. Found at www.arinkverma.in