Robot Framework安装及启动遇到问题

一、介绍:

Robot Framework是Python编写的通用型测试框架,具备良好的扩展性,支持关键字驱动,可同时测试多种类型的客户端(Web\PC\移动端)或者接口,也可进行分布式测试执行。常用验收测试和验收测试驱动开发(ATDD)的自动化测试。官网https://robotframework.org/

二、本次基于安装好python3.8版本的基础上,进行Robot Framework安装。

1、首先安装wxPython,wxPython是 Python 语言的一套优秀的 GUI 图形库。(pip install -U:是否已安装都更新最新的)

2、安装robotframwork自动化测试框架


3、安装robotframework-ride,RIDE是一款专门用来编辑Robot Framework用例的软件


4、Selenium2Library是用于Robot Framework的Web测试库, 该库在内部使用Selenium工具。


5、安装后可检查安装的版本:pip list


6、安装后ride.py启动,遇到报错,提示信息是“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”

这是应用设置环境语言时的方法有问题,将安装目录..\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、设置后正常启动显示界面


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容