robotframework踩坑5--记录一天经历的两个坑(AutoItLibrary 安装 )

本来计划是使用 robot 实现上传,结果开机就入坑。

坑1:运行 ride 报错:timer can only be started from the main thread。

  1)环境:

  widows_server2019_x64

  python 3.7.8

  wxpython 4.1.0

  ride 1.7.4.2

   2)原因:

  原因报错已经写的很明白了,timer仅能在主线程上启动,折腾了一上午没解决问题,各种查源码,逛论坛,希望有大神看到能够给解释下是什么原因?

  3)最后粗暴的解决办法:

  切换操作系统为 windows_10_x64,重装python:

  python 3.7.1

  wxpython 4.0.7.post2(可能是wxpython的问题,折腾一上午折腾不动了)

  ride 1.7.4.2

坑二:安装 AutoItLibrary 

  1)检查python安装的库 pip list  -->  pywin32 228

  2)直接pip安装AutoItLibrary:pip install robotframework-autoitlibrary,报错:(报错日志没有记录,大致意思是robotframework没有提供足够的AutoItLibrary方法,所以安装后是有AutoItLibrary目录的,但是关键字不全

  3)下载AutoItLibrary:https://files.pythonhosted.org/packages/92/5f/eca507b656fda849df1edd2a8a0e9423dacab56040f6aca8f6977c7d865b/robotframework-autoitlibrary-1.2.4.zip

  4)cd 到 robotframework-autoitlibrary-1.2.4 目录下,执行 python setup.py install (如果执行setup.py提示错误,管理员身份运行cmd试试)

  5)现在检查下 pip list,该有的运行环境都已经有了,不该有的也有了~~~

  6)在ride中导入AutoItLibrary包:

  7)导入成功,F5查看提供的关键字:

  8)到这里AutoItLibrary是安装完了,AutoItLibrar是使用了AutoIt脚本语言,所以要使用AutoItLibrar内的关键字,继续安装 AutoIt,便于学习~~~

  9)下载 AutoIt:https://www.autoitscript.com/site/autoit/downloads/

  10)在运行程序下认识下 AutoIt 吧:

  AutoIt Windows Info    识别 Windows 控件信息(spy++也是可以的噢~~~

  Compile Script to.exe    将 AutoIt 生成 exe 执行文件。

  Run Script        执行 AutoIt 脚本。

  SciTE Script Editor     编写 AutoIt 脚本。

到这里整个环境是搭完了,但在坑1上花费了大量的时间,今天又是啥也没干的一天,希望后续一切顺利!!!

喜时之言,多失信;怒时之言,多失体
原文地址:https://www.cnblogs.com/xiaohuboke/p/13473515.html