一滤灯、介紹:
Robot Framework是Python編寫(xiě)的通用型測(cè)試框架闺金,具備良好的擴(kuò)展性拒课,支持關(guān)鍵字驅(qū)動(dòng),可同時(shí)測(cè)試多種類(lèi)型的客戶(hù)端(Web\PC\移動(dòng)端)或者接口足删,也可進(jìn)行分布式測(cè)試執(zhí)行寿谴。常用驗(yàn)收測(cè)試和驗(yàn)收測(cè)試驅(qū)動(dòng)開(kāi)發(fā)(ATDD)的自動(dòng)化測(cè)試。官網(wǎng)https://robotframework.org/
二失受、本次基于安裝好python3.8版本的基礎(chǔ)上讶泰,進(jìn)行Robot Framework安裝咏瑟。
1、首先安裝wxPython痪署,wxPython是 Python 語(yǔ)言的一套優(yōu)秀的 GUI 圖形庫(kù)码泞。(pip install -U:是否已安裝都更新最新的)
2、安裝robotframwork自動(dòng)化測(cè)試框架
3狼犯、安裝robotframework-ride余寥,RIDE是一款專(zhuān)門(mén)用來(lái)編輯Robot Framework用例的軟件
4、Selenium2Library是用于Robot Framework的Web測(cè)試庫(kù)悯森,?該庫(kù)在內(nèi)部使用Selenium工具宋舷。
5、安裝后可檢查安裝的版本:pip list
6瓢姻、安裝后ride.py啟動(dòng)祝蝠,遇到報(bào)錯(cuò),提示信息是“wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C") == 0" failed at ..\..\src\common\intl.cpp(1579) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!
OnInit returned false, exiting...
Error in atexit._run_exitfuncs:
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ..\..\src\common\wincmn.cpp(478) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed”
這是應(yīng)用設(shè)置環(huán)境語(yǔ)言時(shí)的方法有問(wèn)題幻碱,將安裝目錄..\Python3.8.5\Lib\site-packages\robotide\application下的application.py 文件中 self.locale =self._initial_locale?(wx.LANGUAGE_ENGLISH) 改為:
self.locale = wx.Locale(wx.LANGUAGE_ENGLISH)
7绎狭、設(shè)置后正常啟動(dòng)顯示界面