目的:用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:\RobotFramework\Extensions\AutoItLibrary
但robot引用Library AutoItLibrary不能使用
參考:
Win7 64位系統下Robotframwork Autoitlibrary 安裝出錯問題解決(還是沒明白原因)
3. 下載並安裝autoit-v3-setup.exe
地址:https://www.autoitscript.com/site/autoit/downloads/
因為autoitlibrary不支持64位的。所以還必須安裝autoit
4. 注冊:C:\Python27\Lib\site-packages\AutoItLibrary\lib\AutoItX3.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這個關鍵字了
