robotFramework-AutoItLibrary测试CS程序

1、安装AutoItLibrary库

方法一:

cmd运行:

C:\Python27\Lib\site-packages>pip install AutoItLibrary

如果上述方法没有安装成功,在此窗口运行:pip install robotframework-AutoItLibrary

方法二:

1、找到AutoItLibrary库包并解压

cmd运行:

C:\Python2.7\AutoItLibrary>python setup.py install

2、AutoItLibrary介绍

AutoItLibrary 是基于 AutoIt 针对于 Robot Framework 开发的一个库。

2.1 AutoItLibrary库关键字介绍

关键字

用途

Run

运行程序

control click

点击按钮

Wait For Active Window

等待活动窗口

control set text

文本框输入

Win Close

关闭程序

Send

发送关键字

Mouse Click

鼠标点击

Process Close

关闭进程

Win Get Title

用于获取窗口标题

Win Set Title

用于设置窗口标题


2.2AutoIt

AutoIt是一个用于针对Windows图形界面进行自动化操作的软件,他可以模拟键盘操作、鼠标操作、窗口和控件操作来进行自动化。

使用方法:将Finder Tool的选择圈拖至目标元素即可获取如下例子中的元素title等值。

robotFramework-AutoItLibrary测试CS程序_第1张图片

下载地址https://www.autoitscript.com/site/autoit/downloads/

使用AutoIt时还需安装pywin32.

robotFramework-AutoItLibrary测试CS程序_第2张图片

你可能感兴趣的:(软件测试)