What Should RPA Freshers Keep in Mind When Creating Bots?

When starting with RPA platforms, many developers think that creating bots is simply a continuous drag-and-drop process to get the bot to run. However, to build understandable, easily modifiable, and sustainable RPA bots under changing environmental conditions, developers need to invest more. After two months of working at akaBot, RPA Developer Lương Minh Duy has drawn useful tips for fresher to confidently start their RPA journey, specifically with the akaBot platform. Let’s discover!

Limit hard-coding values into code

When creating bots, sometimes there are specific values for that bot (such as the website that the bot will operate on, the account the bot uses to log in to the system, etc.). These are values that rarely change, but if they do, it can be time-consuming to find them in the pile of code. 

Therefore, developers should put these values into an excel file so that when the bot runs, it reads the values in the file, making it easier to edit and making the code cleaner.

Workflows can be divided not only vertically but also horizontally

From before, I always divided the bot’s operating process into steps (for example: A → B → C), and then for each step, I would default that as a workflow. However, workflows can be divided more intelligently.

For example, the task “Enter text into the input box” can also be turned into a separate workflow with steps: Identify the box → Wait for the box to appear → Enter. Then, for each task like that, I just need to invoke the workflow and pass the input as the label of that box, thereby reducing the repetition of code when there are many similar input boxes with different labels. By doing this, RPA developers can do their job better, minimizing repetitive tasks.

Inject JavaScript

Sometimes, web operations require performing slightly complex tasks that the available activity on akaBot does not support (such as browsing and retrieving content from elements with the class “test”, opening a new tab based on the URL already available, etc.). In that case, I can code my operation with JavaScript running on the browser’s Console. If successful, I would put that code into the Inject JavaScript activity on akaBot. This method helps the workflow to be neat and the code to be more flexible.

Mapping 

What is the most efficient way to retrieve content from boxes A, B, C, D on the website and fill them sequentially into columns E, F, G, H on the available excel file? If there is no logic to determine the column from the box, initially, I thought I had to use multiple if-else statements or use a variable with the Dictionary type to save the key-value pairs. However, doing so would violate the first rule I learned – limiting constant variables in code.

After two months of practical work, I learned a tip. Put those values into an excel file with two columns: Key, Value. I fill in column Key with A, B, C, D and column Value with E, F, G, H in corresponding order. Then, each time the bot runs, I read that excel file and save the corresponding key-value pairs into the variable of the Dictionary type, temporarily named that variable as dic. Then, when I need to know which column A will be filled in, I just need to write dic(“A”).

akaBot (FPT) is the operation optimization solution for enterprises based on RPA (Robotic Process Automation) platform combined with Process Mining, OCR, Intelligent Document Processing, Machine Learning, Conversational AI, etc. Serving clients in 20+ countries, across 08 domains such as Banking & Finances, Retails, IT Services, Manufacturing, Logistics…, akaBot is featured by Gartner Peer Insights, G2, and ranked as Top 6 Global RPA Platform by Software Reviews. akaBot also won the prestigious Stevie Award, The Asian Banker Award 2021, etc.

Leave us a message for free consultation!

0 Share
Subscribe to Our Newsletter
Get the latest updates of Automation Technology & Success Stories in the Digital Tranformation World!