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. 基于V4L2摄像头采集图片程序设计

    #ifndef __COMMON_H #define __COMMON_H //该头文件定义的是摄像头在屏幕上显示的宽度和高度 #include<stdio.h> #include< ...

  2. Android开发学习之路--MediaPlayer之简单音乐播放器初体验

    很多时候我们都会用手机来播放音乐,播放视频,那么具体地要怎么实现呢,其实主要是MediaPlayer类来完成的.下面通过简单的例子来实现一首歌曲的播放吧.新建工程MediaPlayerStudy,这里 ...

  3. 修改GDAL库支持IRSP6数据

    使用GDAL库发现不能打开IRSP6的数据,不过看GDAL提供的文件格式里面却是支持IRSP6的数据的,具体可以参考网页http://www.gdal.org/frmt_fast.html.下面图1是 ...

  4. 美国康奈尔大学BioNB441元胞自动机MATLAB应用

    美国康奈尔大学BioNB441在Matlab中的元胞自动机 介绍 元胞自动机(CA)是用于计算计划利用当地的规则和本地通信.普遍CA定义一个网格,网格上的每个点代表一个有限数量的状态中的细胞.过渡规则 ...

  5. 02Framelayout:帧布局

    Framelayout:帧布局        >概念:每个组件都是一帧   当前子组件会覆盖前一个组件     >属性:       android:layout_gravity=&quo ...

  6. lk中内联调用的dsb()

    lk中内联调用的dsb() 比如lk的uart_dm_init()函数就调用了dsb() /* Configure the uart clock */ clock_config_uart_dm(id) ...

  7. 使用C++的string实现高精度加法运算

    对于超大数字的运算,用long long int仍然不能解决,这时候就需要考虑通过模拟运算和数组存储来实现高精度运算. 本文讨论借助C++的string来实现高精度的运算. 首先输入的量直接存储为st ...

  8. 调试bootmgr&winload vista&win7 x86&x64

    设置调试bootmgr 1.以管理员权限运行cmd.exe 2.执行以下命令 3.  参照我的另一篇文章<win8 + vmware + windbg 双机调试 >中的第1.3步,建立wi ...

  9. redis3.0.5在linux上安装与配置

    redis3.0.5在linux上安装与配置 rhel6/ubuntu14 1 下载 # wget http://download.redis.io/releases/redis-3.0.5.tar. ...

  10. Android移动后端服务(BAAS)快速搭建后台服务器之Bmob-android学习之旅(75)

    个人移动开发者的最头疼的问题,就是App的网络后台,包含数据库等,国外目前有比较成熟的解决方案,但是限制于墙的问题,推荐国内的解决方案,比较出名的是Bmob和AVOS cloud和Atom等,这一次我 ...