GeeLark RPA Guide for Beginners ( 5 )

Home » Blog » GeeLark RPA Guide for Beginners ( 5 )

By now, you’ve already learned many operation options, but you might still be unsure about certain concepts like “Variables,”“Use variables,”“Stored element objects,” and “Save results to”.

In this chapter, I’ll explain these concepts in detail and guide you through hands-on practice to help you master how to use them. Stay patient, and practice as you learn. Trust me, once you get the hang of these, your RPA skills will improve significantly!

Learning Tip: This chapter covers a lot of theoretical content, so if you don’t fully understand everything right away, that’s okay. You can always learn by making mistakes in real-world applications.

1.What is a Variable?

A variable is a container that stores data. It helps your RPA template temporarily hold information and retrieve it when needed. Let me give you an example to make it clearer:

Getting a Variable

Imagine you’re searching for a product on an e-commerce platform, and the system returns the product name, such as “GeeLark T-shirt.” You can save this product name into a variable called “Name”.

Using a Variable

Later in the template, when you need to use the product name, you simply call the “Name” variable. The RPA will automatically insert the product name into a search box, form, or anywhere else you need it.

The Value of a Variable Can Change

One of the key features of variables is that their value can change. For example, when you search for different products, the variable “Name” will be updated each time with the new product name. RPA will always use the latest value stored in the variable.

Variables are essential in RPA for storing and managing data. They make your templates more flexible and reduce repetitive tasks. By using variables effectively, you can greatly improve the efficiency of your templates and simplify tasks.

If you’re still a bit unsure about the concept of variables, don’t worry! In the upcoming practice sessions, we’ll walk through the steps to help you fully understand how to use variables. Let’s move forward!

2.Types of Variables

In RPA, the data you store can come in different types. Here are some common variable types:

  • Text/String: Used to store words, sentences, or any data made up of characters. For example, you can store a URL, a username, or a button label.
  • Number: Used to store numeric data, including both integers and decimals.
  • Boolean: Used to store two values: true or false. Boolean values are often used for conditions, such as checking if an element exists or if an operation was successful.
  • Object: Object variables store elements or controls from the user interface, like a button. If you save a button as an object variable, you can reference this variable to interact with the button directly without having to find it again every time.

You might still be a bit unclear about some of these, but don’t worry—just keep going! Next, let’s see how to get a variable.

3.How to Get a Variable?

I’ll guide you step by step on how to get and use a variable with the “Get text data of a single element” option. The principle behind other actions is quite similar, so once you understand this one, you’ll be able to apply it to other situations as well.

4.Get Text Data of a Single Element

This action is used to extract text data from elements, such as product titles, post content, or video comments. You can store this extracted text into a variable for later use, like entering the text into a search box or other fields in subsequent steps.

We need to use this action to get the text attribute of an element. So, when locating an element with AutoX.js, make sure to check if the text attribute has a value!

For example, if you want to extract the text inside the red box in the image below, you can use AutoX.js to locate the element and find the corresponding description in the text attribute. If the text value is empty, it means the element might be wrapped inside another element. Be sure to use “View in layout hierarchy” to make it easier to locate the element. You can find more details on how to use this in the earlier section on 3.3 Attribute-Based Method.

Here’s the issue: the description text for each video is different, so in this case, we can’t use the text selector to locate the element. However, we can use the fullId selector to locate the element, and store the retrieved text in a variable called “title”. See the example in the image below:

Next, you can use the “Use variables” option in the “Input Text” action and select the variable title that we just saved. This way, the RPA will automatically input the description text of the TikTok video. Isn’t that much more convenient?

This is just a simple example, but the use of variables is actually much broader. For instance, you can get the TikTok video author’s name, store it in a variable, and then input that name into the search box to perform a search. Once you master this technique, you’ll be able to handle various scenarios flexibly, not just on TikTok, but across other apps as well.

The key to mastering variables is practice. Try extracting text from different elements while reviewing how to locate those elements.

Summarize

This action extracts the text attribute of an element (usually the visible text in the UI), stores it in a variable that you name, and allows you to use this variable in later steps.

5.Stored Element Object

Let me explain this feature with a common scenario:

Due to network loading times, we often need to wait for an element to appear before interacting with it. In this case, I use the “Wait for element to appear” action to save the element into a variable called “button”. Then, in the next step, I can call that variable to click the element. This ensures that the element has appeared before clicking, which increases the success rate of the entire process.

In short: Wait for the button to appear, then click it.

First, I use “Wait for Element to Appear” to save the element into the “button” variable. At this point, the “button” variable is an element object. An “element object” typically refers to any interactive UI element, such as a button, text field, or icon.

Next, when we want to click the element, we simply use the “button” variable. Choose “Stored element object” and select it we just saved.

So, the sequence of steps is as follows: Wait for the Like button to appear, and then click the Like button.

Now that you’ve completed Part 4 and Part 5, you should feel more confident handling some business tasks—well done! But don’t get too comfortable. You might run into some challenges. For example, what happens if a popup shows up unexpectedly? Or how do you deal with repetitive tasks? Don’t worry—I’ll cover these tricky issues in the Advanced section.

Before jumping into the next part, I suggest you apply what you’ve learned in the past to tackle your business needs.

Test and debug as you go, and you’ll truly hone your skills. As for exercises, I won’t be giving you any for now—your business tasks are the best “real-world problems” to practice on. Learning by doing is the key!