Test Automation Forum

Welcome to TAF - Your favourite Knowledge Base for the latest Quality Engineering updates.

Celebrating our 2nd Anniversary!


(Focused on Functional, Performance, Security and AI/ML Testing)

Brought to you by MOHS10 Technologies


Focused on Functional, Performance, Security and AI/ML Testing

Enabling 100% coverage for file upload and download using AutoIt in Selenium


A web application has not limited itself to work always within the web. Sometimes there is a need for interaction of the web with the local system for uploading and downloading files. Automating this type of workflow is a bit complex with Selenium as the scope of Selenium is limited within the web.  Let’s learn how AutoIt helps in enabling 100% file upload and download in Selenium.

Business case

Our client has a background remover application, that uses AI to remove the background and reduce editing time which will help the users to add or remove the background of an image if they want to.

Challenges for optimization of testing

Every release requires testing, and manual testing was time-consuming. The team has recently implemented an agile process, where the functionality is changing frequently which is a challenge for optimizing the whole testing process.

Our automation testing approach

  • Automation helped the customer to verify/test different types of files within a short period.
  • QA team developed a test plan by integrating Selenium with AutoIt Platform for uploading the image from the local system and validating its result.
  • Automation helped the team complete tests faster, reducing overall testing efforts by 25%.
  • Using our internal Selenium-based hybrid framework, we provided the results and records in well-documented formats.
  • We implemented shift-left by integrating the testing environment with Jenkins.

Testing Tools used

Selenium: We used Selenium as it is an open-source automation testing tool to demonstrate web applications across different browsers and platforms. A wide range of programming languages like Java, Python, Ruby, c#, R-Data, PHP, Perl, etc are supported by Selenium. It supports a variety of operating systems—Windows, Mac, or Linux and browsers like Mozilla Firefox, Internet Explorer, Google Chrome, Safari, or Opera.  Selenium can be integrated with tools such as TestNG and JUnit for managing test cases and generating reports. It is integrated with Maven, Jenkins, and Docker to achieve continuous testing. Selenium focuses on automating web-based applications.

Need for third-party tool in Selenium

A web application is not limited to functioning entirely within the web. Sometimes, there is a need for the website to interact with the local system for the uploading and downloading of files. Automating this type of workflow can be complex with Selenium, as Selenium’s scope is limited to within the web browser itself. If you need to automate a workflow that will go from the browser to the desktop and from the desktop to Selenium, then the AutoIt tool may be a solution to your problem.

What is AutoIt?

AutoIt is an open-source scripting language that is designed for automating windows GUI and general scripting. It is a fusion of mouse movement, simulated keystrokes, and window control manipulation to automate a task that is not possible by the selenium Web driver. AutoIt is also very small, self-contained, and will run on all versions of Windows out-of-the-box with no annoying “runtimes” required! An AutoIt automation script can be converted into a compressed, stand-alone executable that can be run on computers even if they do not have the AutoIt interpreter installed.

Language used

Java: All are very familiar with the term “Java”. It is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. Most developers use java for coding web applications. It has been a popular choice among IT Professionals for over two decades, with millions of Java applications in use today. It is owned by Oracle, and it is used by more than 3 billion devices. Java is a multi-platform and network-centric language that can be used as a platform in itself. It is a fast, secure, reliable programming language for coding everything from mobile apps and enterprise software to big data applications and server-side technologies. In the current job market, the demand for java is significant. Java applications are typically compiled to byte code that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++ but has fewer low-level facilities than either of them. The Java runtime provides dynamic capabilities (such as reflection and runtime code modification) that are typically not available in traditional compiled languages.

What is TestNG?

 TestNG is an open-source test automation framework for Java. It is developed on the same lines as JUnit and NUnit. A few advanced and useful features provided by TestNG make it a more robust framework than its peers. The NG in TestNG stands for ‘Next Generation. Created by Cedric Beust, it is used more frequently by developers and testers in test case creation, owing to its ease of using multiple annotations, grouping, dependencies, prioritization, and parameterization features.

Using TestNG, you can generate a proper report, and you can easily come to know how many test cases are passed, failed, and skipped. You can execute the failed test cases separately.

Why use TestNG in Selenium?

By default, Selenium tests do not generate a proper format for the test results. Using TestNG in Selenium, we can generate test results.

Feature of TestNG

  1. Multiple Before and After annotation options
  2. XML-based test configuration
  3. Dependent methods
  4. Groups/groups of groups
  5. Data-driven testing
  6. Multithreaded execution
  7. Better reporting

key benefits

  1. With Selenium-based hybrid framework and use of reusable methods, allowed the QA Team to reduce the automation effort by 25%.
  2. 40% reduction of the overall testing cost.
  3. CI and CD with test automation helped to identify errors and defects.
  4. Provides improved accuracy by around 96%
  5. Reduces the time by 50%. 


In recent times, the web GUI has become so much more complex with the integration of several native third-party elements which makes it challenging for the test automation engineers to achieve 100% automation coverage. This problem statement needs a QA org to invest more by procuring additional third-party platforms that can ensure better automation coverage.

Using an open-source platform like Selenium, the above automation approach (AutoIT integrated with Selenium) has helped our team to improve the overall project quality and reduce the cost and time as well. The result was a sharp reduction in the amount of overtime required for the team and the number of hotfixes and production issues and it provided full test coverage.        

Total Page Visits: 2210

1 thought on “Enabling 100% coverage for file upload and download using AutoIt in Selenium”

Comments are closed.

Submit your article summary today!

[wpforms id="2606"]

Thank you for your interest in authoring an article for this forum. We are very excited about it!

Please provide a high level summary of your topic as in the form below. We will review and reach out to you shortly to take it from here. Once your article is accepted for the forum, we will be glad to offer you some amazing Amazon gift coupons.

You can also reach out to us at info@testautomationforum.com