Getting Started with Autoitlibrary library

Source: Internet
Author: User

First,autoitlibrary Introduction

1. Why Use Autoitlibrary

Selenium2library is basically sufficient when we actually test the Web page, but there will be some cases that will be out of selenium2library control and cannot be manipulated. For example, when downloading files, to choose where to save the file, such as uploading files, to choose which file to upload, these in the selenium2library is not a good way to deal with. But the combination of the autoitlibrary, it can be very good to deal with.

2.AutoItLibray Download and Installation

Because autoitlibrary needs to rely on the Pywin32 library. So to use autoitlibrary, we must first install the PYWIN32.

( note : Python's installation directory cannot have spaces, and if there is a space, it will cause an error registering the AutoIt DLL).

pywin32:http://sourceforge.net/projects/pywin32/files/pywin32/)

autoitlibrary:http://code.google.com/p/robotframework-autoitlibrary/)

64-bit machine: In addition to installing the above 2, you will have to install a AutoItV3

(The latest official website: http://www.autoitscript.com/site/autoit-news/autoit-v3-3-10-0-released/, if there is an update, please download it from the homepage). In general, this can be used after loading.

After the installation is complete, import the ride:

3. Autoitlibrary Object recognition:

There will be some assistive tools in the installation directory, such as Autoitx.chm is a help document, autoitlibrary.html is the keyword document description of the test library, Au3Info.exe is the most important tool to identify objects.

In the Finder tool position there is a doji, you can use the mouse to drag him to the object you need to identify. As shown in the following:

Second, the basic knowledge

1. Object manipulation:

Autoitlibrary's object operations are largely a few major parts,window operations, control operations, mouse operations, process operations, run operations, Reg operations , and some other operations.

The first three operations are more commonly used, window and control should be better understood, you see the window is Windows, window buttons, text boxes, etc. is control. So when you usually want to manipulate the control, you typically need to activate the window before you manipulate the control.

You can see the most important attributes identified, divided in two, in the upper left half,basic Window info, and basic Control info.

After I use many times, window recognition with title more, control mainly with Controlid,controlid is in basic Control info class+instance, for example, this object in the picture, His controlid is Edit1, the key word Strcontrol is ControlID (CHM is written controlid).

2. Common keywords:

1) Run: Run executable program

2) Wait for active window (waiting for Windows to activate), Win wait (Window wait), winwaitactive

3) Win close: Close window

4) control get text (get text content), control click (mouse click)

5) Send: Enter the content information, followed by a detailed explanation.

Example:

Getting Started with Autoitlibrary library

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.