Yet another blog about WPF, Surface, SL, MVVM, NUI.... - Tag - testing http://blog.lexique-du-net.com/index.php? In this blog we talk about WPF, Natural User Interface(NUI), Microsoft Surface, WIndows 7, Multitouch, Touchless, JavaFX, MVVM, patterns, tips, tricks .... and a lot of other things ! en Mon, 26 Feb 2024 15:40:43 +0100 Jonathan ANTOINE, All rights reserved http://blogs.law.harvard.edu/tech/rss Dotclear UIAutomation, Coded UI tests, AutomationPeer and WPF/silverlight custom controls http://blog.lexique-du-net.com/index.php?post/2011/03/23/UIAutomation%2C-Coded-UI-tests%2C-AutomationPeer-and-WPF-custom-controls urn:md5:629820d459b6479cd3dee0084d2f3179 Thu, 24 Mar 2011 00:04:00 +0100 JonathanANTOINE@falsemail.com WPF AutomationCoded UI TestsSilverlighttesttestingtestsWindows Presentation FoundationWPF <p style="margin-top: 0; ">The Coded UI Tests, available in Visual Studio Ultimate or Premium, enable the creation of automated tests for the User Interface. This is a really nice feature because you are no more forced to make "hand made" tests which takes hours to be performed.&nbsp;</p> <p style="margin-top: 0; ">The WPF controls in the framework are ready to be used by the Microsoft UI Automation which is itself used by the coded UI tests. This means that when you use the screen recorder to record the tests on your UI, it will be able to find the several control used in your application.</p> <p>When you create you own custom controls or extend standard one, the recorder would not be able to find them at first and so a whole part of the screen may not be available for tests. Actually, it is possible to record a test but every steps will be done using screen position: click at (120,30), drag from (120,30) to (10,40). This is really annoying because any changes in the UI may broke all your tests.</p> <p><br /><strong>In this post, we will see how to make a custom control fully useable in Coded UI tests scenarii. We will so answer the question "Why cannot the code UI test recorder find anything inside my WPF or Silverlight custom control ?"</strong></p> <p><strong><br /></strong></p> <p>Note: the same technique is used by the accessibility clients and by enabling this feature you also ease the people using your application through UI automation client like the partially-sighted person.</p> <p>How it works Everything is based on a class named AutomationPeer. When an UI Automation client analyzes your User Interface, it looks for an automation peer and uses it to walks trough the tree of peers. The tree of peers is nearly a visual tree but it exposes only the relevant part of the interface.  Every standard controls have a regarding... <a href="http://blog.lexique-du-net.com/index.php?post/2011/03/23/UIAutomation%2C-Coded-UI-tests%2C-AutomationPeer-and-WPF-custom-controls"><em>Read</em> UIAutomation, Coded UI tests, AutomationPeer and WPF/silverlight custom controls</a></p> http://blog.lexique-du-net.com/index.php?post/2011/03/23/UIAutomation%2C-Coded-UI-tests%2C-AutomationPeer-and-WPF-custom-controls#comment-form http://blog.lexique-du-net.com/index.php?post/2011/03/23/UIAutomation%2C-Coded-UI-tests%2C-AutomationPeer-and-WPF-custom-controls#comment-form http://feeds.feedburner.com/JonathanAntoine/comments/72 How to create an hand writing to text control (ink recognizer) http://blog.lexique-du-net.com/index.php?post/2010/09/19/How-to-create-an-hand-writing-to-text-control-%28ink-recognizer%29 urn:md5:f9aea256e97acb32c48044cd92d26be4 Mon, 25 Oct 2010 00:01:00 +0200 JonathanANTOINE@falsemail.com MultiTouch apicontrolscustomdemohow tohow-tomanipulationmathmultitouchNatural User InterfacesampleTemplatetesttestingteststipstrickWindows Presentation FoundationWPFXAML <p>When building a (multi)touch application you may need one nice feature : translate hand-written text to real words. This open a whole new world full of possibilities like starting some actions when keywords are recognized or simply allow the users to write some text for later use.&nbsp;<br /><br /><strong>In this post we'll see all the step to create an hand writing to text control and how to tune it.</strong></p> <p>Specifications The HandWritingToText controls translate the text written with it's hand by the user into "computer text". The final purpose is to triggers some actions when a specific keyword is recognized and it'll so be able to recognize only one word at a time and not a whole text.   The recognized text will be published via an event and... <a href="http://blog.lexique-du-net.com/index.php?post/2010/09/19/How-to-create-an-hand-writing-to-text-control-%28ink-recognizer%29"><em>Read</em> How to create an hand writing to text control (ink recognizer)</a></p> http://blog.lexique-du-net.com/index.php?post/2010/09/19/How-to-create-an-hand-writing-to-text-control-%28ink-recognizer%29#comment-form http://blog.lexique-du-net.com/index.php?post/2010/09/19/How-to-create-an-hand-writing-to-text-control-%28ink-recognizer%29#comment-form http://feeds.feedburner.com/JonathanAntoine/comments/55 WPF tip : How can I use static/dynamic resources in my tests http://blog.lexique-du-net.com/index.php?post/2010/09/24/WPF-tip-How-can-I-use-static/dynamic-resources-in-my-tests urn:md5:4a3dab56d52a0b0385223e6db58a46ec Fri, 24 Sep 2010 12:33:00 +0200 JonathanANTOINE@falsemail.com WPF .NET4.0examplehow tohow-totesttestingtestsunitWPF <p>You are surely, as I am, creating a lot of units tests in your WPF applications. Some of the tests may use statics or dynamics resources declared in your application and when you launch the tests, all you get is an XamlParseException exception thrown. System.Windows.Markup.XamlParseException: 'Provide value on... <a href="http://blog.lexique-du-net.com/index.php?post/2010/09/24/WPF-tip-How-can-I-use-static/dynamic-resources-in-my-tests"><em>Read</em> WPF tip : How can I use static/dynamic resources in my tests</a></p> http://blog.lexique-du-net.com/index.php?post/2010/09/24/WPF-tip-How-can-I-use-static/dynamic-resources-in-my-tests#comment-form http://blog.lexique-du-net.com/index.php?post/2010/09/24/WPF-tip-How-can-I-use-static/dynamic-resources-in-my-tests#comment-form http://feeds.feedburner.com/JonathanAntoine/comments/58