Robot Framework+AutoItLibrary使用

目的:用Robot Framework测试win7桌面程序
 
因为安装完了才补的记录,估计有错漏:(
 
 
步骤:
1. 尝试pip install AutoItLibrary
  失败
2. 下载AutoItLibrary安装包:AutoItLibrary-1.1.zip
  地址:http://www.softpedia.com/get/Programming/Components-Libraries/AutoItLibrary.shtml
解压后,python setup.py install
pip list可以看到:AutoItLibrary (1.1.post1)
安装到的路径是:C:RobotFrameworkExtensionsAutoItLibrary
但robot引用Library AutoItLibrary不能使用
 
参考:
Win7 64位系统下Robotframwork Autoitlibrary 安装出错问题解决(还是没明白原因)
 
3. 下载并安装autoit-v3-setup.exe
  地址:https://www.autoitscript.com/site/autoit/downloads/
因为autoitlibrary不支持64位的。所以还必须安装autoit
 
4. 注册:C:Python27Libsite-packagesAutoItLibrarylibAutoItX3.dll
提示:错误代码为0x8007005
运行(或[win]+r):
然后输入regsvr32 wavdest.dll 回车进行注册,
出现“模块wavdest.dll已加载,但对于DllRegisterServ的调用失败,错误代码为0x8007005” 按确定。
之后按开始--所有程序--附件---以管理员身份运行命令提示符(鼠标右键单击) 再次输入regsvr32 wavdest.dll
ok搞定
 
5. 在robot中:Library AutoItLibrary
可以使用
 
6. 为了使用截图功能,下载并安装PIL-1.1.7.win32-py2.7.exe
  地址:http://www.pythonware.com/products/pil/
就可以用Get screen image这个关键字了
原文地址:https://www.cnblogs.com/workingdiary/p/7456866.html