skip to Main Content

AutoITScriptHandler function

This function is used to trigger auto it script defined in Data > Manage AutoITScript Section.

Firstly you have to define your AutoIt script by navigating to Data > Manage AutoIT Script as shown below:

Note: Name defined in Manage AutoItscripts will be used in the function to execute this script.

Select RUN command from the action dropdown and leave Screen and Element key as blank, edit parameter section and click on Form, select functions from the dropdown and select AUTOITSCRIPTHANDLER function. Provide the name of Autoit script in the form.

In some cases, we need to pass arguments to AutoItscripts in order to parameterize the script. In those cases we will pass the arguments from test steps.

Define the arguments and use them in your AutoIt function as shown below

AutoIt script will takes the arguments from above steps and then it can be used as shown below

Local $iVar_A1=$CmdLine[1]
Local $iVar_A2 =$CmdLine[2]
WinWaitActive(“Windows Security”)
WinWaitActive(“[CLASS: Credential Dialog Xaml Host]”, “”, 10)
Send($iVar_A2 )

Here argument 1 will be passed in $CmdLine[1] and argument 2 will be passed in $CmdLine[2].

The above AutoIt Script is a sample script for handling windows credential pop up.

Back To Top