zoukankan      html  css  js  c++  java
  • 使用UI Automation实现自动化测试1

    Introduction

    UI AutomationMicrosoft .NET 3.0框架下提供的一种用于自动化测试的技术,是在MSAA基础上建立的,MSAA就是Microsoft Active AccessibilityUI Automation在某些方面超过了MSAAUI自动化提供了Windows Vista中,微软Windows XP的全部功能,和Windows Server 2003

    UI Automation中,所有的窗体、控件都表现为一个AutomationElement AutomationElement 中包含此控件或窗体的属性,在实现自动化的过程中,我们通过其相关属性进行对控件自动化操作。对于UI用户界面来说,所有显示在桌面上的UI,其实际是一个UI Tree,根节点是desktop。我们可以使用UI Spy或者是SPY++来获得WindowControl的相关信息。在UI Automation里,根节点表示为AutomationElemnet.RootElement. 通过根节点,我们可以通过窗体或控件的Process IdProcess Name或者Window Name找到相应的子AutomationElement,例如DialogButton TextBoxCheckbox等标准控件,通过控件所对应的Pattern进行相关的操作。

    UI Automation structure

    如下图所示:



    1. 
    在服务端由UIAutomationProvider.dllUIAutomationTypes.dll提供。

         2. 在客户端由UIAutomationClient.dllUIAutomationTypes.dll提供。

         3. UIAutomationCore.dllUI自动化的核心部分,负责Server端和Client端的交互。

         4. UIAUtomationClientSideProvides.dll为客户端程序提供自动化支持。

    Summary

        本文主要简单介绍了UI Automation相关结构以及核心库。

     

     

    Open Source code

     

        Github: https://github.com/cumtkangyi/ATP

     

     

  • 相关阅读:
    windows安装php的redis扩展及测试(适合php个各个版本)
    golang+linux+pipline
    泰勒展开式
    微积分
    矩阵
    learning rate warmup实现
    python asyncio as_completed
    python asyncio run_until_complete
    python asyncio 使用ThreadPoolExecutor和asyncio完成阻塞IO请求
    python asyncio call_soon, call_at, call_later
  • 原文地址:https://www.cnblogs.com/kangyi/p/1549411.html
Copyright © 2011-2022 走看看