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.
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
ReplyDeleteThanks Ken. I have really appreciated it.
DeleteIt keeps me to engage on the content and it gives good explanation of the topics.
ReplyDeleteJava Web Application Frameworks
ORM Framework In Java
The blog which you have shared is more creative... Waiting for your upcoming data...
ReplyDeleteFuture Scpoe Of Cloud Computing
Future Of Cloud Computing