Skip to main content

TagUI: an Excellent Open Source Option for RPA - Introduction


 Photo by Dinu J Nair on Unsplash

Today I want to introduce TagUI, an RPA (Robotic Process Automation) Open Source tool I am using to automate test scenarios for web applications. It is developed and maintained by the AI Singapore national programme. It allows writing flows to automate repetitive tasks, such as regression testing of web applications. Flows are written in natural language: English and other 20 languages are currently supported. Works on Windows, Linux and macOS.
The TagUI official documentation can be found here.
The tool doesn't require installation: just go the official GitHub repository and download the archive for your specific OS (ZIP for Windows, tar.gz for Linux or macOS). After the download is completed, unpack its content in the local hard drive. The executable to use is named tagui (.cmd in Windows, .sh for other OS) and it is located into the <destination_folder>/tagui/src directory.
In order to use it, the Google Chrome web browser needs to be installed.

TagUI scripts are plain text files that require just the .tag extension to their names. A TagUI script is referred as flow, because it contains the actions that need to be automated and their execution order.
Here's a quick reference to the principal TagUI steps available for web applications RPA:

  • click: Click on any element, region of image of a web page.
  • visit: Navigation to a web page. It can be omitted and it is possible to simply specify the URL of the destination web page.
  • type: Input text into web input fields.
  • assign: Assign a value to a variable.
  • read: Save text from web elements or screen into a variable.
  • if...else: The usual if...else statement common to any programming language.
  • for: The usual for loop common to any programming language.
  • select: Selection of a dropdown option.
  • table: Save HTML content to a CSV file.
  • popup: Execution of steps in a new tab.
  • frame: Execution of steps in a frame.
  • download to: Specify a location to store downloading files.
  • upload: Upload a file to a website.
  • snap: Take a screenshot of a web page or element.
  • echo: Print a message to the command line.
  • show: Show element text to the command line.
  • check: Validate something.
  • wait: Pause execution for some time.
  • //: Add a comment.

Steps interact with web elements through identifiers, which include web identifiers, image snapshots, screen coordinates. The following is an example of a full TagUI flow to perform a search in Google.com:

// Visit google.com
https://www.google.com
 
// Look on the web page for an element with 'q' in its text, id or name
// and type the search text TagUI RPA, then Enter
type //*[@name="q"] as TagUI RPA[enter]
 
// Click the first result using XPath
click (//*[@class="g"])[1]//a
 
// Wait 3 seconds so the page can load
wait 3
 
// Save a screenshot of the web page to top_result.png
snap page to top_result.png

TagUI flows can be executed in the following modes:
    • Browser based: an instance of Chrome is started and it is possible to visually watch everything happening at flow execution time.
    • Headless: flow execution happens in the background with no visible browser.
    • No Browser: flow execution without any browser (suitable for automation in machines with no browser nor graphical interface).

Execution logs can be generated in text or HTML format.

My personal feedback on this tool. Definitely it is easy to use and gives the possibility also to people having no technical background to automate tasks. No major drawbacks so far. The documentation is comprehensive in terms of steps syntax and general practices, but lacks complex examples, so when applying flows to web applications implemented using modern web frameworks some practices can only be learned by trial and error. The live mode execution helps a lot in those situations.

In a future post I will share some tips about few particular situations I have met when using it.

Comments

  1. Thanks Googlielmo on your blog post introducing TagUI! I share your blog post to my network - https://www.linkedin.com/posts/kensoh_tagui-an-excellent-open-source-option-for-activity-6818379246864596992-6V8V

    ReplyDelete
  2. It keeps me to engage on the content and it gives good explanation of the topics.
    Java Web Application Frameworks
    ORM Framework In Java

    ReplyDelete
  3. The blog which you have shared is more creative... Waiting for your upcoming data...
    Future Scpoe Of Cloud Computing
    Future Of Cloud Computing

    ReplyDelete

Post a Comment

Popular posts from this blog

Exporting InfluxDB data to a CVS file

Sometimes you would need to export a sample of the data from an InfluxDB table to a CSV file (for example to allow a data scientist to do some offline analysis using a tool like Jupyter, Zeppelin or Spark Notebook). It is possible to perform this operation through the influx command line client. This is the general syntax: sudo /usr/bin/influx -database '<database_name>' -host '<hostname>' -username '<username>'  -password '<password>' -execute 'select_statement' -format '<format>' > <file_path>/<file_name>.csv where the format could be csv , json or column . Example: sudo /usr/bin/influx -database 'telegraf' -host 'localhost' -username 'admin'  -password '123456789' -execute 'select * from mem' -format 'csv' > /home/googlielmo/influxdb-export/mem-export.csv

jOOQ: code generation in Eclipse

jOOQ allows code generation from a database schema through ANT tasks, Maven and shell command tools. But if you're working with Eclipse it's easier to create a new Run Configuration to perform this operation. First of all you have to write the usual XML configuration file for the code generation starting from the database: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd">   <jdbc>     <driver>oracle.jdbc.driver.OracleDriver</driver>     <url>jdbc:oracle:thin:@dbhost:1700:DBSID</url>     <user>DB_FTRS</user>     <password>password</password>   </jdbc>   <generator>     <name>org.jooq.util.DefaultGenerator</name>     <database>       <name>org.jooq.util.oracle.OracleDatabase</name>     ...

Turning Python Scripts into Working Web Apps Quickly with Streamlit

 I just realized that I am using Streamlit since almost one year now, posted about in Twitter or LinkedIn several times, but never wrote a blog post about it before. Communication in Data Science and Machine Learning is the key. Being able to showcase work in progress and share results with the business makes the difference. Verbal and non-verbal communication skills are important. Having some tool that could support you in this kind of conversation with a mixed audience that couldn't have a technical background or would like to hear in terms of results and business value would be of great help. I found that Streamlit fits well this scenario. Streamlit is an Open Source (Apache License 2.0) Python framework that turns data or ML scripts into shareable web apps in minutes (no kidding). Python only: no front‑end experience required. To start with Streamlit, just install it through pip (it is available in Anaconda too): pip install streamlit and you are ready to execute the working de...