作者:Daly 出处:http://www.cnblogs.com/daly 欢迎转载,也请保留这段声明。谢谢!

最近刚给Windows GUI automation项目介的实现框架,总结记录一下, 供以后查看。

Robot Framework is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD). It has easy-to-use tabular test data syntax and it utilizes the keyword-driven testing approach.

Its testing capabilities can be extended by test libraries implemented either with Python or Java, and users can create new higher-level keywords from existing ones using the same syntax that is used for creating test cases.

Robot Framework itself is open source software and most of the libraries and tools in the ecosystem are also open source.

With a lot of standard and external libraries.

Pywinauto is a GUI automation library written in pure Python and well developed for Windows GUI. At its simplest it allows you to send mouse and keyboard actions to dialogs and controls on both Windows and Linux, while more complex text-based actions are supported on Windows only so far (Linux AT-SPI support is under development).

This big release introduces MS UI Automation (UIA) support (WinForms, WPF, Qt, browsers, Store apps and more).

Modules keyboard and mouse can be used out of any window context now. And they work on Linux as well! Multi-backend architecture allows to add new platforms support.

Robot Framework + Pywinauto

1. Encapsulate the pywinauto codes(functions) to self definedlibraries for Robot Framework

2. Add self defined Library to robot framework

2.1 Method#1: Add Library in Test Suite

2.2 Method#2: Import the Library directly in the Test Case

Launch RIDE

1. Add New Project:

2. Add New Test Suite:

3. Add New Test Case:

4. Write test case:

Run the Scripts via RIDE

Click Log/Report button to view the Log/Report in browser:

ENV Preparation

1. Install Python

Install python 2. x or python 3.x (https://wiki.python.org/moin/Python2orPython3)

Notes:

1.1 Add python.exe to the PATH Environmental Variable(Can check this via installation)

1.2 RIDE does not support Python3

1.3 pip is already installed if you are using Python 2 >=2.7.9 or Python 3 >=3.4

2. Install wxPython (For RIDE UI)

Method#1: pip install wxPython

Method#2: cd to the source code and run python setup.py install in command line

Method#3: install wxPython-xxx.exe(You need to install wxPython 2.8.12.1 with unicode support to run RIDE)

3. Install Robot Framework

Method#1: pip install robotframework

Method#2: cd to the source code and run python setup.py install in command line

4. Install RIDE

Method#1: pip install robotframework-ride

Method#2: cd to the source code and run python setup.py install in command line

5. Install pywinatuo

Method#1: pip install pywinauto

Method#2: cd to the source code and run python setup.py install in command line

Notes: If pip can work, can install item#2 to item#5 together via one command: pip install -r requirements.txt

Add PYTHONPATH in Environmental Variable

Notes:

1. If the self defined library does not in the PATH, you can add related directory to the PYTHONPATH

IDE

For Python:

Eclipse (Use Python plugin)

PyCharm

For RobotFramework:

RIDE (A lightweight and intuitive editor for Robot Framework test data.)

Start RIDE: cd to x:\Python27\Scripts\ and execute python ride.py in command line

Eclipse (Use RobotFramework plugin)

Tools

GUI Inspect Tool

1. Swapy.exe

This tool based on

Pywinauto 0.5.4

2. Inspect.exe

3. AccExplorer.exe

RIDE Settings

WebSite:

pywinauto java_Robot Framework + Pywinauto 框架实现Windows GUI Automation相关推荐

  1. Robot Framework + Pywinauto 框架实现Windows GUI Automation

    作者:Daly 出处:http://www.cnblogs.com/daly 欢迎转载,也请保留这段声明.谢谢! 最近刚给Windows GUI automation项目介的实现框架,总结记录一下, ...

  2. 开源自己用python封装的一个Windows GUI(UI Automation)自动化工具,支持MFC,Windows Forms,WPF,Metro,Qt...

    首先,大家可以看下这个链接 Windows GUI自动化测试技术的比较和展望 . 这篇文章介绍了Windows中GUI自动化的三种技术:Windows API, MSAA - Microsoft Ac ...

  3. Robot Framework 自动化测试框架核心指南-初识Robot Framework(学习笔记2)

    初识Robot Framework 1.1如何创建一个自动化测试项目 1.1.2 创建测试套件 1.1.3 创建测试用例 1.2 Robot Framework基础关键字 1.2.1 如何搜索Robo ...

  4. 【Android自动化测试】Robot Framework+adb框架(五)——L1层测试用例

    前言 Robot Framework是一款用Python编写的通用型测试框架,具有良好的可扩展性,支持关键字驱动,可以同时测试多种类型客户端(Web,PC,移动端)或者接口,也可以进行分布式测试执行. ...

  5. 结合Delphi和Python的优势:使用Delphi VCL组件快速构建超现代的Python本机Windows GUI桌面酷炫用户界面应用

    Delphi开发Pyhron GUI 有时您的应用程序需要一个用户界面,但是为Python应用程序制作用户界面最好的方法是什么?输入用于Python的DelphiVCL.VCL是成熟的Windows本 ...

  6. dommel mysql_.Net Core AA.FrameWork应用框架介绍

    开发多年,一直在从社区获取开源的便利,也深感社区力量的重要性,今天开源一个应用基础框架AA.FrameWork,也算是回馈社区,做出一点点贡献,希望能够帮助类似当年入行的我. AA.FrameWork ...

  7. Entity Framework 实体框架的形成之旅--实体数据模型 (EDM)的处理(4)

    在前面几篇关于Entity Framework 实体框架的介绍里面,已经逐步对整个框架进行了一步步的演化,以期达到统一.高效.可重用性等目的,本文继续探讨基于泛型的仓储模式实体框架方面的改进优化,使我 ...

  8. Entity Framework 实体框架的形成之旅--为基础类库接口增加单元测试,对基类接口进行正确性校验(10)...

    本篇介绍Entity Framework 实体框架的文章已经到了第十篇了,对实体框架的各个分层以及基类的封装管理,已经臻于完善,为了方便对基类接口的正确性校验,以及方便对以后完善或扩展接口进行回归测试 ...

  9. Entity Framework 实体框架的形成之旅--基于泛型的仓储模式的实体框架(1)

    很久没有写博客了,一些读者也经常问问一些问题,不过最近我确实也很忙,除了处理日常工作外,平常主要的时间也花在了继续研究微软的实体框架(EntityFramework)方面了.这个实体框架加入了很多特性 ...

最新文章

  1. 洛谷 P2163 [SHOI2007]Tree 园丁的烦恼
  2. GC之二--GC是如何回收时的判断依据、shallow(浅) size、retained(保留) size、Deep(深)size...
  3. 项目Alpha冲刺(团队)-代码规范、冲刺任务与计划
  4. 判断元素是否在ndarray_专业文章 | 如何判断是否构成有“一定影响”的包装装潢...
  5. 取0-1中间任意数java_java – 找到一个整数n 0,其中包含以下三个条件
  6. 计算机软件职业资格证书查询,电子社保卡可查询职业资格证书啦!
  7. PyTorch系列入门到精通——梯度消失与爆炸,损失函数
  8. 计算机应用第1次行考0001,四川电大5110083 计算机应用基础第二次形考_0001答案
  9. sql server 与 oracle 的不同,第一感觉。
  10. linux备份数据库软件有哪些内容,Linux网络备份MySQL数据库的应用方法
  11. LeetCode IPO
  12. python定位元素方法_Python+webdriver定位元素的几种方法
  13. 学习ARM64页表转换流程
  14. MTPA 永磁同步电机 计算
  15. wifi认证过程wpa/wpa2
  16. c语言合并两个顺序表算法,顺序表的两种合并操作(C语言)
  17. ‘\0‘到底是什么?
  18. 03【Verilog实战】UART通信协议,半双工通信方式(附源码)
  19. [c语言]进值转换的详细代码实现(二进制,十进制,十六进制等)
  20. 用我的计算器吧,我的python计算器贼牛逼

热门文章

  1. 【shell脚本编程大全-笔录01】
  2. VMware虚拟机配置公网ip
  3. Java使用正则表达式验证用户名和密码
  4. 解密Diem币:探索Facebook的数字货币计划
  5. css3中的动画属性
  6. 如何简单的在IDEA中关联git远程仓库
  7. Unity3D 阴影和深度纹理总结
  8. 远离“电脑病”完全手册
  9. 能将计算机运行结果以可见的方式向用户展示的部件是,统考计算机应用基础复习大纲(选择题)...
  10. 解释性语言和翻译性语言的区别