[原]RobotFrameWork(十一)AutoItLibrary测试库在win7(64bit)下安装及简单使用

最近安装AutoItLibrary,发如今win7 x64下没法安装成功,后来通过定位,发现是3rdPartyTools\AutoIt目录下面AutoItX3.dll的问题。由于AutoItX3.dll32位的,因此我就在网上搜索了一个64位的dll去替代。再次安装就没有问题了。html


针对AutoItLibrary,我进行如下3个修改:python

1. AutoItX3.dll替换为64位的,使其支持win7 x64windows

2. 修改AutoItLibrary自带用例,支持win7中文环境运行python2.7

3. 使用robotframework自己的ScreenshotLibrary 取代AutoItLibrary中截图测试

 

1、安装ui

1. 安装python2.7robotframework,参考http://blog.csdn.net/mengfanbo123/article/details/8450760spa

2. 安装pythonwindows的扩展pywin32-218.win-amd64-py2.7.exe,下载地址:http://download.csdn.net/detail/liuheng123456/6235457.net

3. 安装Pillow,以便使用ScreenshotLibrary ,下载地址:http://download.csdn.net/detail/liuheng123456/6235465htm

4. 安装AutoItLibrary(win7 x64),下载地址:http://download.csdn.net/detail/liuheng123456/6236097blog

①解压压缩包后,在dos命令下,进入到解压的AutoItLibrary目录,好比:我把 AutoItLibrary-1.1_x64解压到E盘下,就执行cd E:\AutoItLibrary-1.1_x64

②执行python setup.py install 

5. 安装检查

①在建立一个测试套(suite),并在Setting中导入AutoItLibrary和Screenshot,而后保存整个工程




②按F5,能够看到AutoItLibrary和Screenshot,代表安装成功




2、AutoItLibrary自带计算器用例运行

AutoItLibrary安装完成后,会在C盘下生成C:\RobotFramework文件夹,用例就在C:\RobotFramework\Extensions\AutoItLibrary下面。

①进入C:\RobotFramework\Extensions\AutoItLibrary\,你会看到有test_cn和test_en两个文件夹,test_cn是能够运行在win7中文环境下的,test_en则是英文环境。

②进入test_cn,双击RobotIDE.bat,而后运行用例就ok了。




③运行完用例,查看log.html,能够看到Screenshot截图




做者:liuheng123456 发表于2013-9-9 11:41:53 原文连接
阅读:329 评论:0 查看评论
相关文章
相关标签/搜索