自动化测试学习日记

自动化测试学习日记

记录自动化测试的学习历程

首先从python环境的搭建记录

python安装包可以从官网下载:python官网下载
最好下载exe版本,比较方便快捷。

安装路径建议修改C盘根目录创建一个python的文件夹,中文路径可能会导致不必要的麻烦。
安装过程中,环境变量记得勾选,否则需要手动添加安装目录到环境变量,环境变量修改后重启计算机即可。在cmd中输入python会显示版本号,代表安装成功。的在这里插入图片描述
接下来安装需要的python库,对于文件较大的库,可以使用国内的镜像网站安装,解决pip下载慢的问题
默认的按照命令为:
pip install 安装包名称
使用豆瓣镜像网站命令为:
pip install 安装包名称 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

接下来在win10按照python的ride工具
pip install robotframework -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install robotframework-ride -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

按照后在python的Scripts目录执行python ride.py可以开启ride界面
但是开启后报错,如下:

Traceback (most recent call last):
  File "C:\Python38\lib\site-packages\robotide\application\application.py", line 58, in OnInit
    self.frame = RideFrame(self, self._controller)
  File "C:\Python38\lib\site-packages\robotide\ui\mainframe.py", line 175, in __init__
    self._init_ui()
  File "C:\Python38\lib\site-packages\robotide\ui\mainframe.py", line 279, in _init_ui
    self.tree = Tree(self, self.actions,
  File "C:\Python38\lib\site-packages\robotide\ui\tree.py", line 86, in __init__
    self._images = TreeImageList()
  File "C:\Python38\lib\site-packages\robotide\ui\images.py", line 42, in __init__
    TestCaseController: _TreeImage(self, 'robot.png'),
  File "C:\Python38\lib\site-packages\robotide\ui\images.py", line 80, in __init__
    self.normal = self._get_image(image_list, normal)
  File "C:\Python38\lib\site-packages\robotide\ui\images.py", line 91, in _get_image
    img = wx.Image(path, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
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

需要手动修改在Python安装目录下,\Lib\site-packages\robotide\application中的application.py文件,加一行修改语言为英文的代码即可:self.locale = wx.Locale(wx.LANGUAGE_ENGLISH)在这里插入图片描述
接下来再次运行ride.py,成功开启ride客户端:
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值