“Avalon”: Using UI Automation to Improve Application Testability Robert Sinclair Group Manager Microsoft Corporation Robert Sinclair.

Slides:



Advertisements
Similar presentations
Malek Kemmou Technology Architect, Application Platform Microsoft Middle East and Africa Overview of ASP.NET 2.0.
Advertisements

TSpaces Services Suite: Automating the Development and Management of Web Services Presenter: Kevin McCurley IBM Almaden Research Center Contact: Marcus.
Windows Vista Presentation Advances Daniel Moth Developer & Platform Group, Microsoft Ltd
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
1 Federating Identity and Authorization Across Organizations and Platforms Matthew Hur Lead Program Manager Microsoft Corporation
Thursday Evening 6.30VB.NET Introduction 7.30Break for food 8.00VB.NET Migration 8.45Q & A 9.00Done.
Module 1: Overview of the Microsoft.NET Framework.
Scelta della tecnologia di presentazione dei dati.
SQL Server 2005 CLR Integration ADO.NET 2.0 Mike Taulty
1 Introducing ClickOnce: The New Application Deployment Model for Windows Forms and “Avalon” Jamie Cool Program Manager Microsoft.
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
Building Rights Management Enabled Applications For Windows "Longhorn" Steve Bourne Chandramouli Venkatesh Microsoft Corporation Steve Bourne Chandramouli.
1 Programming Windows Help Shane McRoberts Group Program Manager Microsoft Corporation Shane McRoberts Group Program Manager Microsoft.
DEV317 Integrating Extensible Business Graphics into Enterprise Applications using Visio 2003 Mai-lan Tomsen Bukovec Program Manager.
OFC 322 Building Office Research Web Services: Exposing Corporate Data Through Office Brian Jones Program Manager Authoring Services Martin Sawicki Lead.
Plataformas.NET para desenvolvimento de aplicações web José António Silva
Data Access Design Patterns: Navigating the Data Access Maze Michael Pizzo Software Architect Microsoft Corporation Michael Pizzo Software Architect Microsoft.
1 Using XSD, CLR Types, And Serialization In Web Services Doug Purdy Program Manager Microsoft Corporation Doug Purdy Program Manager.
Future Directions: Building Customizable Applications using.NET Eric Schnepp TLN205 Lead Program Manager Microsoft Corporation.
1 Keyboard, Speech, and Pen Input in Your Controls Kevin Gjerstad Lead Program Manager Kevin Gjerstad Lead Program Manager
Assemblies & Namespaces1. 2 Assemblies (1).NET applications are represented by an assembly An assembly is a collection of all software of which the application.
 Michael Bernstein Principal Software Design Engineer Microsoft Corporation.
Developing Reporting Solutions with SQL Server
Module 1: Overview of the Microsoft.NET Platform.
“Indigo”: Building Peer-To-Peer Applications Todd R. Manion Program Manager Microsoft Corporation Todd R. Manion Program Manager.
WEB 304 An Overview of ASP.NET and Windows Workflow Foundation Kashif Alam Program Manager Developer Division Microsoft Corporation.
OFC290 Information Rights Management in Microsoft Office 2003 Lauren Antonoff Group Program Manager.
1.NET Framework Overview: A Road Map Brad Abrams.NET Framework Team Microsoft Corporation Brad Abrams.NET Framework.
“Indigo”: Connected Application Technology Roadmap
1 Application Model Fundamentals Chris Anderson Software Architect Microsoft Corporation Chris Anderson Software Architect Microsoft.
Name Microsoft Student Partner Overview of the Visual Studio 2005 Express Products.
Microsoft.Net Sven Groot. Common Language Runtime Superset of ECMA Common Language Infrastructure Defines  Language-neutral platform  Intermediate Language.
Windows Role-Based Access Control Longhorn Update
ADO.NET 2.0: Advanced Data Access Patterns Pablo Castro DAT408 ADO.NET Technical Lead Microsoft Corporation.
MSG331 Exchange Server 2000/2003 Software Development Kit Susan Hill Lead Programmer Writer Microsoft Corporation.
MBL 305 ASP.NET Mobile Controls: Best Practices Gökşin Bakir CSA Yage Ltd. Microsoft Regional Director.
1 Integrating Real-time Collaboration into your Applications Stephanie Lindsey Program Manager Microsoft Corporation Stephanie.
Windows Forms in Visual Studio 2005: An in-depth look at key features Name: Joe Stegman Title: Lead Program Manager Session code.
1 Interop Best Practices and Common Pitfalls (That We Learned the Hard Way) Please write your name on a card in the back and place it in the box… Please.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
DEV332 Programming for the Middle Tier in Visual Basic.NET Billy Hollis Author / Consultant.
SQL Server Notifications: Invalidating Cached Results Michael Pizzo Software Architect Microsoft Corporation Michael Pizzo Software.
Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005.
Extending Workflow With Custom Activities Dennis Pilarinos COM328 Program Manager Microsoft Corporation.
1 Programming ADO.NET in Whidbey Pablo Castro/Brad Rhodes ADO.NET Team Microsoft Corporation Pablo Castro/Brad Rhodes.
1 Developing for Test Automation and Accessibility Using Programmatic Access to the UI Thomas Logan FUN307 Program Manager Microsoft Corporation.
Introducing the Microsoft® .NET Framework
Using Audio, Video, and Imaging in your Longhorn Applications
System.Search, aka “Find My Stuff”
Avalon – Using Data In Your Applications
Transactional Programming In A Windows World
Enterprise Library Overview
Michael Wallent General Manager Windows Client Platform
Understanding Wi-Fi Direct in Windows 8
Reaching more customers with accessible Metro style apps using HTML5
“Whidbey” CLR Internals
11/17/2018 9:30 PM Session Code: ARC 420
Developer Patterns to Integrate Silverlight 4.0 with SharePoint 2010
Building Rich, Interactive Controls for Windows “Longhorn”
New User Interface Possibilities in Longhorn
What's New in Visual Studio 2005
ASP.NET 4 Core Runtime for Web Developers
"Avalon": Building Applications With Controls And Dialogs
DAT381 Team Development with SQL Server 2005
People And Groups Controls In Windows "Longhorn"
Session Code: CLI391 Windows Forms: Exploiting Windows “Longhorn” Features from Within Your Application Mark Boulter .NET Client Team Microsoft Corporation.
Salesforce.com Salesforce.com is the world leader in on-demand customer relationship management (CRM) services Manages sales, marketing, customer service,
Windows Forms in Visual Studio 2005: An in-depth look at key features
Mark Quirk Head of Technology Developer & Platform Group
9/8/ :03 PM © 2006 Microsoft Corporation. All rights reserved.
Presentation transcript:

“Avalon”: Using UI Automation to Improve Application Testability Robert Sinclair Group Manager Microsoft Corporation Robert Sinclair Group Manager Microsoft Corporation Session Code: CLI307

Agenda What is UI Automation? Demo: Windows UI Automation in action A comparison of approaches Overview of Windows UI Automation Sample Code Security Considerations Key Take-Aways What is UI Automation? Demo: Windows UI Automation in action A comparison of approaches Overview of Windows UI Automation Sample Code Security Considerations Key Take-Aways

Tools Client Application Model AvalonWindows Forms Web & Service Application Model ASP.NET / Indigo Win FS Compact Framework Yukon Mobile PC Optimized Data Systems Application Model Presentation Data Mobile PC & Devices Application Model Communication Command Line NT Service DataSet Mapping ObjectSpaces ObjectSpace Query Schema Item Relationship Media Audio Video Images System.Messaging System. Discovery System.DirectoryServices System.Remoting System.Runtime.Remoting Active Directory Uddi System.Web.Services Web.Service Description Discovery Protocols System.MessageBus Transport Port Channel Service Queue PubSub Router Fundamentals System.ComponentModel System.CodeDom System.Reflection System.EnterpriseServices System.Transactions Security System.Windows. TrustManagement System.Web. Security System.Message Bus.Security Authorization AccessControl Credentials Cryptography System.Web.Configuration System.MessageBus.Configuration System.Configuration System.Resources System.Management System.Deployment System.Diagnostics ConfigurationDeployment/Management System.Windows System.Windows.Forms System.Console System.ServiceProcess System.Windows.Forms System.Web System.Storage System.Data.SqlServer Animation Controls Control Design Panel Controls Dialogs SideBar Notification System.Windows Documents Text Element Shapes Shape Ink UI Element Explorer Media System.Windows.Forms Forms Control Print Dialog Design System.Web.UI Page Control HtmlControls MobileControls WebControls Adaptors Design System.Collections Generic System.Search Annotations Monitoring Logging Relevance System.Data SqlClient SqlTypes SqlXML OdbcClient OleDbClient OracleClient Core Contact Location Message Document Event System.Storage System.Web Personalization Caching SessionState System.Xml Schema Serialization Xpath Query Permissions Policy Principal Token System.Security System.Collaboration RealTimeEndpoint TransientDataSession SignalingSession Media Activities HttpWebRequest FtpWebListener SslClientStream WebClient System.Net NetworkInformation Sockets Cache System.Web Administration Management Navigation Peer Group Policy Recognition System.Speech Synthesis UI Automation System.Windows.Automation System.Timers System.Globalization System.Serialization System.Threading System.Text System.Design Ports InteropServices System.Runtime System.IO Serialization CompilerServices Base & Application Services System.Windows.Automation Provider InteropProvider

“UI Automation” defined Gather information about the UI Dynamically discover UI structure Extract property information Receive event notifications when UI changes Query an element for its behavior Interact with UI elements Click a button, scroll a list, move a window, etc. Inject keystrokes and mouse input Gather information about the UI Dynamically discover UI structure Extract property information Receive event notifications when UI changes Query an element for its behavior Interact with UI elements Click a button, scroll a list, move a window, etc. Inject keystrokes and mouse input – code that programmatically drives another application’s UI to yield a desired result

Windows UI Automation in Action Goals: Traverse the UI tree Query a control for its functionality Interact with the control Goals: Traverse the UI tree Query a control for its functionality Interact with the control

Application #2Application #1 Today’s Approach to Automation Custom 1 WinFormsSDMWin32 Custom 2 Text PanelWin32 Automation Utility Win32 Messages & APIs Win32 Messages & APIs SDM Object Model SDM Object Model Custom 1 APIs Custom 1 APIs … … Text Object Model Text Object Model Custom 2 APIs Custom 2 APIs WinForms Methods WinForms Methods

Interacting with a Control Comparison of Approaches Today – Invest in each control library Use each library’s proprietary APIs to: Traverse its tree Collect UI information Manipulate the controls At runtime: Test the control’s classname Call your library or control-specific routines Longhorn – Use Windows UI Automation Traverse UI structure using a single tree Base your app logic on control behaviors Obtain UI Automation security permissions Today – Invest in each control library Use each library’s proprietary APIs to: Traverse its tree Collect UI information Manipulate the controls At runtime: Test the control’s classname Call your library or control-specific routines Longhorn – Use Windows UI Automation Traverse UI structure using a single tree Base your app logic on control behaviors Obtain UI Automation security permissions

UI Automation Clients UI Automation Providers Windows UI Automation Core Longhorn Model: UI Automation Assistive Technology Products Scripting Utilities Testing Framework “Avalon” Implementation Control Proxy Custom Implementation …InteropProvider…Provider MSAvalon.Windows.Automation Legacy Control ISV Object Model Atuomated Test …InteropProvider

Windows UI Automation Automation framework built into Longhorn Platform-level support for automating all UI elements Avalon, WinForms, Win32, Visual Basic, etc. Exposes a consistent object model for all controls 3 rd party controls easily integrate into model Security Model – client must be trusted Locale, machine, and resolution independent Creates new opportunities for innovation in: Automated UI Testing Assistive Technology Products Command-and-Control Utilities Automation framework built into Longhorn Platform-level support for automating all UI elements Avalon, WinForms, Win32, Visual Basic, etc. Exposes a consistent object model for all controls 3 rd party controls easily integrate into model Security Model – client must be trusted Locale, machine, and resolution independent Creates new opportunities for innovation in: Automated UI Testing Assistive Technology Products Command-and-Control Utilities

UI Automation Overview Logical Tree – structure of the UI Stitches all UI trees into one coherent structure Eliminates unnecessary elements Resembles the structure perceived by an end user Properties – important UI information Name, Bounding Rectangle, Persistent ID, etc. Events – notification of UI changes Window creation, change in focus or selection, etc Control Patterns – control behavior Scroll, Selection, Window, ExpandCollapse, etc. Input – simple mouse and keyboard input Logical Tree – structure of the UI Stitches all UI trees into one coherent structure Eliminates unnecessary elements Resembles the structure perceived by an end user Properties – important UI information Name, Bounding Rectangle, Persistent ID, etc. Events – notification of UI changes Window creation, change in focus or selection, etc Control Patterns – control behavior Scroll, Selection, Window, ExpandCollapse, etc. Input – simple mouse and keyboard input

UI Automation Control Patterns Mutually exclusive classes of control behavior Control developers (providers) expose these patterns for new or existing controls Automation developers (clients) use patterns to Discover what functionality a control offers Gather pattern-specific property information Receive pattern-specific events Programmatically manipulate the control Examples: Button: Invoke ListBox: Scroll, Selection ComboBox: Scroll, Selection, ExpandCollapse Mutually exclusive classes of control behavior Control developers (providers) expose these patterns for new or existing controls Automation developers (clients) use patterns to Discover what functionality a control offers Gather pattern-specific property information Receive pattern-specific events Programmatically manipulate the control Examples: Button: Invoke ListBox: Scroll, Selection ComboBox: Scroll, Selection, ExpandCollapse

Expand Collapse Pattern Goals: Traverse Logical Element tree Query for supported patterns Find an element that supports ExpandCollapse Manipulate the control Goals: Traverse Logical Element tree Query for supported patterns Find an element that supports ExpandCollapse Manipulate the control

Security Model No default automation permissions UI Automation functionality is protected according to the following permissions: Read – Navigate tree, get properties, receive events Write – Call control pattern methods Input – Call methods in the Input class Access to Rights Managed requires additional permissions No default automation permissions UI Automation functionality is protected according to the following permissions: Read – Navigate tree, get properties, receive events Write – Call control pattern methods Input – Call methods in the Input class Access to Rights Managed requires additional permissions

3 Key Take-aways  Platform-level support for automating UI  Control independence Simplifies your client logic Means less code to write and maintain  New opportunities Integrate additional control libraries Expose custom object models, properties, events, etc. Extend the UI Automation framework  Platform-level support for automating UI  Control independence Simplifies your client logic Means less code to write and maintain  New opportunities Integrate additional control libraries Expose custom object models, properties, events, etc. Extend the UI Automation framework

Call to Action Next 30 days Study System.Windows.Automation.* Spend a day playing with UI Automation Submit feedback on client or provider side Longhorn Beta 1 Providers: Implement UI Automation for your custom controls Clients: Use UI Automation to develop your automation clients Longhorn RTM Ship your fully-enabled UI Automation providers and clients!! Next 30 days Study System.Windows.Automation.* Spend a day playing with UI Automation Submit feedback on client or provider side Longhorn Beta 1 Providers: Implement UI Automation for your custom controls Clients: Use UI Automation to develop your automation clients Longhorn RTM Ship your fully-enabled UI Automation providers and clients!!

Question & Answer Join me for further discussion in the Client Track Lounge Please fill out an on-line session evaluation on COMMNET Thank You for Coming! Join me for further discussion in the Client Track Lounge Please fill out an on-line session evaluation on COMMNET Thank You for Coming!

© Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.