Skip to content

Iptv Assist

Learn More from us

Menu
  • HOW TO
  • Firestick
  • Chromecast
  • PC Apps
  • Lg Smart TV
  • IPTV Services
  • Automation Testing
  • Smart TV
  • Software Testing Tools
  • Contact Us
Menu

AutoIt Tutorial – AutoIt Download, Install & Basic AutoIt Script

Posted on March 26, 2023

Best Iptv Service Provider 2023 With 40k+ Channels And 100k+ VOD . 24/7 Suppport . Paypal Supported

This is an AutoIt Tutorial for Beginners. Learn to Download, Install and Write Basic AutoIt Scripts to Handle Windows Pop-up using AutoIt and Selenium:

Best Iptv Service Provider 2023 With 40k+ Channels And 150k+ VOD . Hurry Up

Pop-ups are those irritating windows that come up while we work on something important and interrupt our concentration. It is necessary to get rid of them while testing.

Recommended IPTV Service Providers

  1. IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
  2. IPTVRESALE – Rating 5/5 ( 200+ Reviews )
  3. IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
  4. IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
  5. IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
  6. IPTVTOPS – Rating 5/5 ( 43 Reviews )

 

In this article, we shall discuss how to handle window pop-ups in automation testing using AutoIt.

This tutorial covers:

  • How to handle window pop-ups in Selenium WebDriver,
  • Uploading or downloading the files or images by transferring our control from Selenium WebDriver to AutoIt
  • How to call the AutoIt script from our program

But first, let’s understand what is AutoIt, how to install and use it.

AutoIt Tutorial

What You Will Learn:

  • What is AutoIt?
  • AutoIt Download and Installation – Step by step Guide
  • AutoIt Script Editor – Installation
  • How to write AutoIt script:
  • Download pop-up example:
  • Upload pop up example:
  • How to upload the file?
  • Login Pop-Up Window Example
  • How to enter username and password to the above login pop-up alert window?
  • What else can we use AutoIt for?
  • Conclusion:

What is AutoIt?

AutoIt V3 is a freeware tool which is used for automating anything in Windows environment. AutoIt script is written in a BASIC language. It can simulate any combination of keystrokes, mouse movement and window/control manipulation.

Through AutoIt, we can prepare scripts for our routine actions like file input/output operations, application handling, resources monitoring, and administrative tasks and so on. However, in this article, we shall limit our discussion to handling window pop-ups in Selenium WebDriver.

While doing automation through Selenium or through any other tool for that matter, we all encounter a common problem, windows pop-ups. As Selenium is confined to automating browsers, desktop window is out of scope. Web applications sometimes need to interact with the desktops to perform things like file downloads and uploads. There are tools available for automating these sorts of workflow such as AutoIt, Robot Framework, Silk Test etc.

We can upload or download the files or images by transferring our control from Selenium WebDriver to AutoIt. We need to explicitly call the AutoIt script from our program.

Also, read => How to Handle Alerts/Popups in Selenium WebDriver

AutoIt Download and Installation – Step by step Guide

AutoIt Download: Click here to download AutoItV3 current version and AutoIt Script Editor.

Once downloaded, install the AutoItV3 setup on your system. Follow below steps to install AutoIt.

Step #1 – Click on the setup file

AutoItV3 setup 1

Step #2 – Accept the license agreement

AutoItV3 setup 2

Step #3 – Choose 64 bit or 32-bit options based on your operating system: I choose 64 bit

AutoItV3 setup 3

Step #4 – Click on next and select what operation you want to perform by double-clicking: I choose run the script

AutoItV3 setup 4

Step #5 – Choose all the components that are required and click next. You can also choose default where all are checked

AutoItV3 setup 5

Step #6 – Choose file installation location and click on Install. It will take a few seconds to install. Once done, install the script editor

AutoItV3 setup 6

AutoIt Script Editor – Installation

Download the SciTE.exe and install; it is an editor which helps in finding the commands.

AutoItV3 setup 7

How to write AutoIt script:

  • Identify the Windows control, through AutoItV3 Windows Info tool for 64 bit or 32 bit depending on your operating system
  • Click on Finder Tool and mouse hover over the object for which you want the properties
  • It will capture the properties of pop-up like Title, Class, Position, Size, Style, Handle and so on

AutoIt V3 Window Info – finder tool

AutoIt V3 Window Info – finder tool

  • Then with the help of above-captured properties, write a script in SciTE script editor or in notepad and save the script with .au3 extension
  • Now compile the .au3 script using AutoIt Script to EXE converter, which converts .au3 file to .exe file
  • In that editor provide source and destination folder location and click on convert button, it will create a .exe file

AutoIt Script to Exe converter:

AutoIt Script to Exe converter

  • Else right click you’re saved .au3 script, it will show compile options. Select compile to 64bit or compile to32 bit option and will create a .exe file in the same folder.
  • Wherever you encounter download/ upload pop-up window in your Selenium test case, execute the .exe file
  • Syntax to call .exe file in your script is: Runtime.getRuntime().exec(“path of exe file”);

Download pop-up example:

AutoItV3 setup 10

How to download the file?

You can use the below AutoIt script to handle the download popups:

We have already captured the file download popup properties like Tile, Class, Position, and Size and so on in our previous steps. Now build an AutoIt script using identified windows control:

WinWait("[TITLE:Opening ; CLASS:MozillaDialogClass]","", 10)  //Explanation – “It will wait for the title – opening , type- mozilladialogclass, for 10 secs
If WinExists("[TITLE:Opening ; CLASS:MozillaDialogClass]") Then  // if condition
WinActivate("[TITLE:Opening ; CLASS:MozillaDialogClass]")  // if that title is found it will activate and perform below actions
Send("{DOWN}")  // perform down arrow operation
Sleep(10)   // wait for 10 secs
Send("{TAB}")  // perform tab operation
Sleep(10) // wait for 10 secs
Send("{TAB}") // perform tab operation
Sleep(10)  // wait for 10 secs
Send("{ENTER}")  // press enter button
EndIf  // end of if condition

Upload pop up example:

AutoItV3 pop up example

How to upload the file?

You can use the below AutoIt script to handle the Upload window popup:

Build an AutoIt script using identified windows control:

WinWaitActive("File Upload") // enter the title of the pop up
Send("Path of the file to enter")   // enter the path of the file to upload
Send("{ENTER}") / press enter

Save and compile this script and execute that .exe file in your selenium script where we need to upload the file.

Recommended reading =>> Handling file upload in Selenium

Login Pop-Up Window Example

AutoIt tutorial popup handle

How to enter username and password to the above login pop-up alert window?

You can use the below AutoIt script to handle the login popup:

WinWaitActive("Authentication Required","","10")
If WinExists("Authentication Required") Then
Send("username{TAB}")
Send("Password{Enter}")
EndIf'

How to test if your AutoIt script is showing expected results or not without integrating it in your selenium script?

Follow below steps:

  • Before compiling your script double click .au3 file – it will show the errors in your script
  • If no errors are found then convert your script into a .exe file
  • Manually generate the file download pop scenario
  • Now the pop is available and click on the .exe file, it should be able to accept the pop-up and download the file

Disadvantages of AutoIT:

  • It works only in Windows operating system
  • Knowledge of fundamental coding principles is a must
  • It is great tool for professional but bit complicated for beginners

What else can we use AutoIt for?

Apart from handing windows pop-ups, we can use AutoIt to automate your each and every windows operation like file search, copy file from one location to other, installation of software and so on: Refer below examples –

The script for file search in your computer:

$search = FileFindFirstFile("*How*") // enter the search string
If $search = -1 Then // condition not satisfied show error message
MsgBox(1, "Error", "No files/directories matched the search pattern")
Exit
EndIf
While 1
$file = FileFindNextFile($search)
If @error Then ExitLoop
MsgBox(4096, "File:", $file)
WEnd
FileClose($search)

Save and compile this script and execute that .exe file in your current working directory. It will search all the files which start with “How” and display a message box.

Further resources: Learning to Script with AutoItV3 here and here – basic getting started guides to start using AutoIt scripting.

Important aspects you should keep in mind while working with AutoIt:

  • Do not forget to save your script with .au3 extension
  • Compile your script and create a .exe executable file
  • The pop-up or anything that you want to handle should be present beforehand so that the .exe file can work on it

Conclusion:

We can use AutoIt to automate anything in a Windows Operating System environment. It is a script that is written in a BASIC language and can handle any type of window pop-ups which we encounter while doing automation testing. It can kindle various things such as combinations of keystrokes, mouse movement and window/control manipulation.

Using AutoIt, we can also handle any interaction issues between Selenium WebDriver and Windows.

Here, we learned how to upload/download file pop-up, but there are also other issues such as browser authentication popup, file search in a particular directory, etc. We can handle all these issues by using AutoIt tool.

You can also write scripts through AutoIt to start a task at a particular time, to schedule a task, to copy a file from one server to another and so on.

Do you have any tips/experience/questions to share on AutoIt tool? Let us know in comments below.

Related

Best Iptv Service Provider 2023 With 40k+ Channels And 150k+ VOD . Hurry Up

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • IPTV List: Best iptv lista 2023
  • IPTV Premium: Best Premium IPTV Service Provider List And Benefits
  • Nikon IPTV Review: Over 10,000 Live Channels for $12/Month
  • Iptvwings. Com Review: +18000 Live IPTV Channels ,+70000 Movies, +40000 TV show For $15/1 month
  • IPTVUNO Review: More Than 16000 Live TV channels, 55,000 Movies & VOD For $15/Month

Recent Comments

  1. IPTV List: Play lista iptv 2022 - Iptv Assist on Best IPTV Player in 2023 for Watching Live TV
  2. Cola IPTV – Over 18,000 Live Channels for $12/Month - Iptv Assist on FileLinked – How to Install on Firestick/Fire TV and Android Devices
  3. Cola IPTV – Over 18,000 Live Channels for $12/Month - Iptv Assist on 50+ Best IPTV Service Providers for Streaming Live TV 2023
  4. XoomsTV IPTV – Over 11,000 Channels & VOD for Under $13/Month on Best VPN for IPTV in 2023 and How to Install on Firestick/Android
  5. Voodoo Streams IPTV Review – Over 12,000 Channels for $11/Month - Iptv Assist on Dynasty TV IPTV Review – Over 6,000 Channels for $10/Month

Archives

  • March 2023

Categories

  • Activate
  • Agile Testing
  • Alternatives
  • Android
  • APK
  • Apple TV
  • Automation Testing
  • Basics of Software Testing
  • Best Apps
  • Breakfast Hours
  • Bug Defect tracking
  • Career in Software Testing
  • Chromebook
  • Chromecast
  • Cross Platform
  • Database Testing
  • Delete Account
  • Discord
  • Error Code
  • Firestick
  • Gaming
  • General
  • Google TV
  • Hisense Smart TV
  • HOW TO
  • Interview Questions
  • iPhone
  • IPTV
  • IPTV Apps
  • Iptv Service SP
  • IPTV Services
  • JVC Smart TV
  • Kodi
  • Lg Smart TV
  • Manual Testing
  • MI TV
  • Mobile Testing
  • Mod APK
  • newestiptv.com
  • News
  • Nintendo Switch
  • Panasonic Smart TV
  • PC Apps
  • Performance Testing
  • Philips Smart TV
  • PS4
  • PS5
  • Python
  • QA Certifications
  • QA Leadership
  • QA Team Skills
  • Quality Assurance
  • Reddit
  • Reviews
  • Roku
  • Samsung Smart TV
  • Screenshot
  • Selenium Tutorials
  • Sharp Smart TV
  • Skyworth Smart TV
  • Smart TV
  • Soft Skills For Testers
  • Software Testing Templates
  • Software Testing Tools
  • Software Testing Training
  • Sony Smart TV
  • Sports
  • Streaming Apps
  • Streaming Devices
  • Tech News
  • Test Management Tools
  • Test Strategy
  • Testing Best Practices
  • Testing Concepts
  • Testing Methodologies
  • Testing News
  • Testing Skill Improvement
  • Testing Tips and Resources
  • Toshiba Smart TV
  • Tutorials
  • Twitch
  • Types of Testing
  • Uncategorized
  • Vizio Smart TV
  • VPN
  • Web Testing
  • What is
  • Xbox
©2023 Iptv Assist | Design: Newspaperly WordPress Theme