Use AI For Chrome Automations
Author: CA. Rahul Gabhawala
Author: CA. Rahul Gabhawala
Introduction
I am CA Rahul Gabhawala, a Chartered Accountant passionate about accounting automation and taxation. I focus on integrating AI and automation into finance to simplify complex processes and improve efficiency.
On March 28, 2025, I had the privilege of presenting at the ICAI AI Hackathon, where I showcased how AI can used to automate the Income Tax Portal using Selenium and Excel (VBA), making compliance easier and boosting productivity.
Problem Statement
Logging on Income Tax Portal and downloading required data (may it be acknowledgment of income tax return or its intimation order, or Annual Information Statement) is time-consuming and prone to severe human intervention which not only wastes precious computing resources available with a CA Firm but also precious manhours which could have otherwise been used for more productive uses. Automating the process using Selenium integrated with Excel (VBA) allows users to streamline data entry, form submission, and report generation without requiring programming expertise in high-level languages like Python.
Why Use Selenium with Excel (VBA)?
Installation & Setup
Follow these steps to set up Selenium with Excel (VBA):
Step 1: Download Selenium Wrapper for VBA (available on internet)
Step 2: Add Selenium Reference to VBA
Step 3: Process Flow for Automating Income Tax Portal Tasks
Writing & Running Code in VBA
Step 1: Save the Webpage (HTML Format)
Step 2: Upload the HTML File to ChatGPT
Step 3: Ask ChatGPT to Extract the Required Elements & Write VBA Code
Use the following prompt to get accurate automation code:
Prompt 1: Analyze the Webpage Elements
"I have uploaded an HTML file of the Income Tax portal login page. Extract the element details for entering the PAN number and submitting the form."
Prompt 2: Generate VBA Code to Open the Page & Enter PAN
"Write VBA code using Selenium that opens the Income Tax portal in Chrome, enters a PAN number in the given field, and clicks the CONTINUE button."
Prompt 3: Modify Code Based on Errors (If Needed)
"I ran the code, but I am getting an error. Can you debug and correct it?"
Step 4: Run the VBA Code in Excel
Conclusion
Automating tax filing using Selenium with Excel (VBA) eliminates manual work, enhances accuracy, and improves efficiency. Since Excel is widely used in offices, this solution is accessible without requiring knowledge of high-level programming languages like Python. By leveraging VBA and Selenium, finance professionals can streamline tax-related workflows effortlessly.
Note: The author can be contacted at rahulgabhawala@gmail.com for queries
Demonstration of this is hosted by ICAI at
youtube.com/live/nSQ7IwxGoN0?si=q29vSpdrm_NkHOgK&t=2178