Using these properties, we can pass the parameters for the control command. We have its properties displayed in the tool as shown.įor the FileName box, the properties and its corresponding values are :
In order to get various attributes of each element in the Windows pop up, drag the ‘Finder’ icon of the Windows Info Tool and click on the element to display its properties as below. This tool is used to inspect elements in the Windows application/pop up. The Windows Info tool gets opened as below: We can pass these parameters by using the Windows Info tool of AutoIt. When you look at its description, you can see that it requires one or more parameters. In this case, we set focus to the edit text box. Let’s understand the above points in details:ĬontrolFocus: Sets focus to the element specified. Now, in order to automate the Windows pop up, the below actions are to be performed:
Let us see how to automate the same file upload scenario using these control commands of AutoIT. Here is the list of control commands in AutoIT. We have certain control commands in AutoIT to perform actions.
exe file is created, you can use the file in the Selenium Automation script to run the commands in it This file is what we use in the Selenium script. au3 file and compile it.Īfter compilation, it gets converted to. Send() – sends ENTER keystroke to the window, which in turn completes the action of upload. Click on Open button or Press Enter in Keyboard In this example, I need to type in the fileName, so I use the command to enter the Filename in the window. Send – sends keyboard strokes or in other words, it simulates keyboard actions.Īctions might be pressing on the Enter Key, Shift Key, so on. Enter the path of the filename to upload in FileName Box You should specify the window title based on the browser that you use for automation.Ģ. Say, for Firefox, it is ‘File Upload’, - So AutoIT command will be WinWaitActive(“File Upload”).įor IE, it is ‘File To Upload’ - So AutoIT command will be WinWaitActive(“File To Upload”)įor Chrome, it is ‘Open’ - So AutoIT command will be WinWaitActive(“Open”) Please note that the same Windows title differs for each browser. So we specify the command as WinWaitActive(“Open”). In this case, the title of the window is ‘Open’. WinWaitActive: Sets the focus of the cursor to the Window name specified. Let’s understand the above points in detail:
Using the command-line argument to specify the FileName to be uploaded.Īll the scripts are created using AutoItScriptEditor, which is available in the AutoIt folder package.Using Control Commands to upload a file.
Using Windows Commands to upload a particular file.Now, let us have a look at how to automate actions in the Windows pop up? When Windows pop up appears, the AutoIT script is used to automate that part. Until Step 3, Selenium Automation can handle it.
Windows pop up appears wherein the path to upload a picture is entered.Enter a valid username, password, and log in.The scenario is to upload a profile picture on LinkedIn. The Test steps for this scenario are: Let’s look at an example, wherein we would need to upload a file to the application. exe format so that it can be used in the Selenium Automation script. It uses a combination of mouse movement and keyboard strokes to automate the actions that are not possible to be done by selenium web driver.ĪutoIt is used in. The scripting language used is called VBScript. #3) Using Command-Line to Specify the Filename to UploadĪutoIT is a third-party tool that is used to handle Windows-based applications.