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 defined libraries 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:

http://robotframework.org/
https://pypi.org/project/robotframework/
https://github.com/robotframework/robotframework

http://pywinauto.github.io/
https://pywinauto.readthedocs.io/en/latest/
https://github.com/pywinauto/pywinauto/releases

Robot Framework + Pywinauto 框架实现Windows GUI Automation的更多相关文章

  1. Robot Framework自动化框架搭建的步骤

    我把自己之前搭建Robot Framework自动化测试框架的步骤整理了一下,感兴趣的同学可以参考一下.   Robot Framework自动化测试框架+ 可视化编辑工具RIDE+Selenium2 ...

  2. 三年磨一剑,robot framework 自动化测试框架核心指南,真正讲透robot framework自动化测试框架(笔者新书上架)。

    序 关于自动化测试的工具和框架其实有很多.自动化测试在测试IT行业中扮演着越来越重要的角色,不管是在传统的IT行业还是高速发展的互联网行业或是如今的大数据和大热的人工智能领域,都离不开测试,也更加离不 ...

  3. Robot Framework自动化测试框架核心指南-如何使用Java编写自定义的RobotFramework Lib

    如何使用Java编写自定义的RobotFramework Lib 本文包括2个章节 1. Robot Frdamwork中如何调用java Lib库 2.使用 java编写自定义的Lib 本文作者为: ...

  4. Robot Framework自动化测试框架核心指南-如何做好自动化测试平台框架的设计

    自动化测试如果需要能高效快速的支撑软件项目的测试,项目的快速迭代以及上线,除了以上我们介绍的需要许多的Lib来支持以及需要高效的去编写自动化测试案例外,还需要一个好的自动化测试框架平台来支撑我们的自动 ...

  5. Robot Framework自动化测试框架初探

    Robot Framework是一款python语言编写,通用的功能自动化测试框架.它使用了比较易用的表格数据语法,基于关键字驱动测试,主要用来验收测试和验收测试驱动开发(ATDD). 本文主要介绍R ...

  6. 基于Python3.7 Robot Framework自动化框架搭建

    一.Robot Framework 和 Selenium 的区别(面试常问) 主流自动化测试框架有Robot Framework 和 Selenium,请根据实际场景选用不同的框架,以下总结各自优缺点 ...

  7. Robot Framework测试框架学习笔记

    一.Robot Framework框架简介         Robot Framework是一种基于Python的可扩展关键字驱动自动化测试框架,通常用于端到端的可接收测试和可接收测试驱动的开发.可以 ...

  8. Robot Framework测试框架用例脚本设计方法

    Robot Framework介绍 Robot Framework是一个通用的关键字驱动自动化测试框架.测试用例以HTML,纯文本或TSV(制表符分隔的一系列值)文件存储.通过测试库中实现的关键字驱动 ...

  9. Robot Framework 自动化框架大纲

    Python + Robot Framework 环境搭建 Android SDK + Appium 环境搭建 RobotFramework - AppiumLibrary 之元素定位 RobotFr ...

随机推荐

  1. 05 Activity 回传数据

    当从一个Activity跳转到第二个Activity后然 让其处理完业务逻辑回传数据给第一个Activity: 回传调用方法顺序: onActivityResult--->>onResta ...

  2. JEECG&Dubbo Demo

    jeecg框架service与dao层类图 吴水成Dubbo Demo项目架构图

  3. 任务定义器——SocketProcessor

    将socket扔进线程池前需要定义好任务,要进行哪些逻辑处理由SocketProcessor定义,根据线程池的约定,作为任务必须扩展Runnable.用如下伪代码表示 protected class ...

  4. eclipse集成html5插件

    1. 在线安装:Help->Install New Software...->Add...-> Name: "Aptana", Location: http:// ...

  5. 我眼中的Linux设备树(二 节点)

    二 节点(node)的表示首先说节点的表示方法,除了根节点只用一个斜杠"/"表示外,其他节点的表示形式如"node-name@unit-address".@前边 ...

  6. C++ Primer 有感(重载操作符)

    1.用于内置类型的操作符,其含义不能改变.也不能为任何内置类型定义额外的新的操作符.(重载操作符必须具有至少一个类类型或枚举类型的操作数.这条规则强制重载操作符不能重新定义用于内置类型对象的操作符的含 ...

  7. polaris: 一个用go实现的支持restful的web框架

    介绍 polaris是一个用go实现的支持restful的web框架,主要参考tornado进行设计. 虽然在go里面搭建一个http server非常的简单,这里强烈推荐gorilla,但并没有很好 ...

  8. (NO.00002)iOS游戏精灵战争雏形(七)

    接上一篇博文,我们继续完成射击的功能. 还是在MainScene.m中,添加initBullets方法: -(void)initBullets{ CCSprite *bullet; for (int ...

  9. (NO.00002)iOS游戏精灵战争雏形(六)

    接下来我们给MainScene场景再添加一个精灵,作为敌人. 双击SpriteBuilder中的MainScene.ccb,从控件库拖入一个CCSprite到CCPhysicsNode中,设置精灵帧为 ...

  10. android View层的绘制流程

    还记得前面<Android应用setContentView与LayoutInflater加载解析机制源码分析>这篇文章吗?我们有分析到Activity中界面加载显示的基本流程原理,记不记得 ...