DEV Community

Cover image for Automate Web Browser and Windows Application using Python

Posted on

Automate Web Browser and Windows Application using Python

Clicknium is a free GUI automation Python module. It allows operating Web browser and Windows application.
Clicknium VS Code extension

Why create the wheel?

Many Python automation tools exist, including Selenium, Pyautogui, and Playwright. Some can only manipulate web pages, while others can only manipulate the desktop application. All of them are easy to learn and use. If you chose to use Selenium, you need to learn something like XPath or selector. Learning Pyautogui is simple. However, in order to control the mouse location, you must use the x- and y-coordinates. The resolution change on a computer screen will cause your automation task to fail. Although learning automation tools, such as Selenium and RPA, is challenging, most people find the automation scenarios to be fairly straightforward in their daily job and lives. Learning automation tools takes more time and effort than performing the task manually. A fantastic tool, in my opinion, will be simple and intuitive so that more individuals can benefit from it.

How simple

Clicknium provides a simple and intuitive API to manipulate UI elements, such as set_text, get_text, click, etc. So the logic of automation code is easy to understand, close to natural language, and functional. How to locate the UI elements as the most difficult problem in automation tasks? To simplify this, we created the Clicknium Recorder. Open the Recorder, and Clicknium will detect the element that the mouse is pointing at automatically. When you click the mouse on the UI element while holding down the Ctrl key, Recorder will immediately grab the element and generate Locator. You can directly get UI elements and operate on them by using Locator directly in your code.

Image description
Clicknium also supports IntelliSense and auto-complete:

Image description

How to try


  • Windows 7+
  • Python 3.7+
  • VS Code

Clicknium Configuration

Search Clicknium in the Visual Studio Code Extension marketplace.

Image description

Follow the welcome page to finish the configuration.

Image description

How to use Locator:

  1. Reference locator directly in your code to get the UI elements and operate it.
  2. Rename the locator to a meaningful name and organize it in folders.
  3. When the mouse hovers over the code, the snapshot of the UI element corresponding to the locator will be automatically displayed, which can be directly Open, Validate, and Recapture. Image description
  4. In the Locator store, you can configure the parameters of the locator, verify the validity of the locator, re-capture, and even support real-time Actions to operate the UI element corresponding to the locator and test the functions of the locator. Image description

I suggest following the next step if it's your first try:
Try the Sample on the welcome page to understand how it works.
Take three minutes to finish your: First Automation Project

Top comments (0)