1 Developing for Test Automation and Accessibility Using Programmatic Access to the UI Thomas Logan FUN307 Program Manager Microsoft Corporation.

Slides:



Advertisements
Similar presentations
3 Copyright © 2005, Oracle. All rights reserved. Designing J2EE Applications.
Advertisements

A SPECTRUM OF ABILITIES CUSTOMER PREFERENCE TEMPORARY CONDITION TRADITIONAL DISABILITY.
Microsoft Access.
What is jQuery Mobile? How to use it? Doncho Minkov Telerik Corporation Technical Trainer.
V0.1 Inclusive and Accessible Application Design June 21, 2012.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
© 2007 IBM Corporation IBM Emerging Technologies Enabling an Accessible Web 2.0 Becky Gibson Web Accessibility Architect.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Design Patterns CS is not simply about programming
Chris J.T. Auld Director – Strategy and Innovation Intergen MSDN Regional Director.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
WebDynpro for ABAP Short introduction.
Scelta della tecnologia di presentazione dei dati.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
Powerful, modern desktops enable next generation applications Hardware acceleration brings real-time lighting, texturing and rendering Visual.
Microsoft Access Ervin Ha.
Saad Ladki Program Manager Microsoft Corporation WUX403.
MVC pattern and implementation in java
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Aurora: A Conceptual Model for Web-content Adaptation to Support the Universal Accessibility of Web-based Services Anita W. Huang, Neel Sundaresan Presented.
Java Beans.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Microsoft Visual Basic 2005: Reloaded Second Edition
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
1 Document Object Model (DOM) MV4920 – XML 24 September 2001 Simon R. Goerger MAJ, US Army
Model View Controller (MVC) Rick Mercer with a wide variety of others 1.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
 Michael Bernstein Principal Software Design Engineer Microsoft Corporation.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
OFC335 Microsoft Office Word 2007 XML Programmability: True Data/View Separation and Rich Eventing for Custom XML Tristan Davis Program Manager Microsoft.
National Center for Supercomputing Applications NCSA OPIE Presentation November 2000.
Java Programming: Advanced Topics 1 Common Elements of Graphical User Interfaces Chapter 6.
Key Applications Module Lesson 21 — Access Essentials
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
Microsoft Access 2013 ®® Tutorial 10 Automating Tasks with Macros.
.  A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate.  Taken advantage of Spring’s multi layer injection.
ModelPedia Model Driven Engineering Graphical User Interfaces for Web 2.0 Sites Centro de Informática – CIn/UFPe ORCAS Group Eclipse GMF Fábio M. Pereira.
Struts 2 introduction. Struts 2 framework Struts 2 A full-featured web application framework for the Java EE platform The Java Servlet API exposes the.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
ARCH-11: Building your Presentation with Classes John Sadd Fellow and OpenEdge Evangelist Sasha Kraljevic Principal TSE.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
14 1 Chapter 14 Web Database Development Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
21 Copyright © 2009, Oracle. All rights reserved. Working with Oracle Business Intelligence Answers.
Model View ViewModel Architecture. MVVM Architecture components.
 ASP.NET provides an event based programming model that simplifies web programming  All GUI applications are incomplete without enabling actions  These.
DOMAIN DRIVEN DESIGN Dave 12 May WHAT IS DDD? Set of principles to aid in building complex systems Enables us to focus on core problem domain NOT.
High degree of user interaction Interactive Systems: Model View Controller Presentation-abstraction-control.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
Introducing Windows Applications Lesson 1. Objectives.
Introducing Windows Applications Lesson 1. Objectives.
J2EE Platform Overview (Application Architecture)
Yochay Kiriaty Senior Technical Evangelist Microsoft® Corporation
ORACLE ADF ONLINE TRAINING COURSE
Working in the Forms Developer Environment
Developing Forms and Subforms.
XAML User Interface Creation in C#
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Reaching more customers with accessible Metro style apps using HTML5
Accessing Data in a .NET Web Application
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Presentation transcript:

1 Developing for Test Automation and Accessibility Using Programmatic Access to the UI Thomas Logan FUN307 Program Manager Microsoft Corporation

2 Key Take-Aways UI Automation Specifies a Universal Object Model for the GUI Implementing UI Automation Provides the Dual Benefit of Test Automation and Accessibility Control Patterns Fully Expose the Functionality of Complex UI

3 Programmatic Access Programmatic access enables developers to write code that; Navigates between UI elements Gathers information about the UI Interacts with UI elements Receives notifications when the UI changes

4 UI Automation (UIA) Programmatic access component of the new accessibility model for Windows Design and development based upon test automation and assistive technology vendor requirements. Creates a universal object model for accessing UI cross-process Successor to Microsoft Active Accessibility (MSAA) Supported on Windows Vista, XP and Server 2003

5 Architecture Client-side API (.NET Managed API) (.NET Managed API) ClientProvider UIA Infrastructure UIA Provider-side interface definitions (.NET Managed API or C++) Test Automation and Assistive Technology Manufacturers Application and Control Developers

6 Key Components of UIA Automation tree – Provides navigation of the UI Automation Element – Represents any piece of the UI Properties – Important UI information Control patterns – Allows interaction with UI elements Allows interaction with UI elements Events – Notifications of changes in UI

7 demo Automating the UI

8 Control Complexity Button Dial List HTML 1 Level N Level

9 Automation Tree Provides unified navigation across UI framework trees of elements. Root node is desktop HWND tree is building block of Automation tree Control View - default view of automation tree

10 Automation Elements An automation element represents a piece of UI, regardless of underlying implementation (Win32, WinForms, Windows Presentation Foundation) Can be obtained Using screen pixel location From focused element From an Hwnd Through navigating the UI

11 Properties Allow clients to gather information about a UI element that is important for programmatic access. UIA Control Type UI Framework Framework Specific Property UI Automation Property Button Windows Presentation Foundation ContentNameProperty ButtonWin32CaptionNameProperty ImageTrident/HTMLALTNameProperty Table: Mapping one standard UIA property to multiple property names in other UI frameworks.

12 Three Key Properties AutomationIdProperty String that uniquely identifies an element among its siblings in the tree ControlTypeProperty Primary identifier for what type of control the automation element represents. NameProperty String of text that a user would use to explain which control was being referred to

13 Steps For Automating The UI Add references to client automation dlls Use System.Windows.Automation namespace Create Condition to match specific element in tree Issue Find command to get reference to element in tree Request Control Pattern from element in tree to perform operation Use information contained on Control Pattern object to control UI

14 Provider Interfaces IRawElementProviderSimple (Patterns and Properties) IRawElementProviderFragment (… adds Structure) IRawElementProviderFragmentRoot (… adds Focus and Hit Testing)

15 Tree Integration Create proxy/adaptor for control to expose control’s underlying object model Handle WM_GETOBJECT Desktop WM_GETOBJECT get_HostRawElementProvider UIA Treats both providers as a single node Merges properties Aggregates children

16 Making a Custom Win32 Control Programmatically Accessible using UIA demo

17 Steps For Provider Creation Include UIAutomationCore.h and UIAutomationCoreAPI.h Create proxy/adaptor class to hold automation/accessibility specific code for control Initialize Automation Identifiers Implement IRawElementProviderSimple interface get_ProviderOptionsget_HostRawElementProviderGetPropertyValue(…)GetPatternProvider(…) Return COM Object in Query Interface Handle WM_GETOBJECT message

18 Control Patterns Describe a particular aspect of a control’s functionality. (Defined to consist of one or more of the following components.) Properties – associated with the pattern’s functionality associated with the pattern’s functionality Methods – allow the control to be manipulated allow the control to be manipulated Events – associated with the pattern’s functionality Structure – parent/child and sibling relationships parent/child and sibling relationships

19 Patterns Associated with ControlType ControlType Associated Control Pattern(s) ButtonInvoke List Selection, Scroll ComboBox Selection, ExpandCollapse, Value TreeItem SelectionItem, ExpandCollapse Edit Text, Value

20 Control Patterns FunctionalityControlPattern Ability to be checked/unchecked Toggle Ability to have numeric value set RangeValue Ability to have text value set Value Ability to be moved / resized Transform Ability to show or hide information ExpandCollapse Implement the appropriate interface based upon the actions a control provides through mouse/keyboard

21 Control Pattern Implementation Implement IRangeValueProvider on proxy class get_Minimumget_Maximumget_LargeChangeget_SmallChangeget_IsReadOnlyget_ValueSetValue(…) Return COM Object in QueryInterface Respond to PatternId request in GetPatternProvider

22 Events Enable clients to be notified when changes occur in the UI Where applicable events are always associated with a reference to automation element where change occurred Clients can filter what parts of automation tree to listen for events on Providers raise events after the UI has been updated

23 Events demo

24 Recap UI Automation Specifies a Universal Object Model for GUI Implementing UI Automation Provides the Dual Benefit of Test Automation and Accessibility Control Patterns Fully Expose the Functionality of Complex UI

25 Community Resources WinFX Software Development Kit: Microsoft Accessibility home page: Please fill out an Evaluation at the Kiosks outside.

26 Appendix

27 Control Patterns DockPatternExpandCollapsePatternGridPatternGridItemPatternInvokePatternMultipleViewPatternRangeValuePatternScrollPatternScrollItemPattern SelectionPatternSelectionItemPatternTablePatternTableItemPatternTextPatternTogglePatternTransformPatternValuePatternWindowPattern