最近安裝AutoItLibrary,發如今win7 x64下沒法安裝成功,後來通過定位,發現是3rdPartyTools\AutoIt目錄下面AutoItX3.dll的問題。由於AutoItX3.dll是32位的,因此我就在網上搜索了一個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.7和robotframework,參考http://blog.csdn.net/mengfanbo123/article/details/8450760spa
2. 安裝python對windows的擴展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截圖