<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3085369818645393747</id><updated>2024-09-11T06:14:29.335-07:00</updated><category term="CodedUI"/><category term="Assertions"/><category term="Test Builder"/><category term="UIMap"/><title type='text'>Coded UI 101 - Understanding Coded UI Tests</title><subtitle type='html'>Microsoft Visual Studio Coded UI tutorials, code snippets, samples. This blog is about providing information to automated testers and developers alike on Microsoft Visual Studio Coded UI tests. We aim to share our knowledge through tutorials and other lovely tidbits of information.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codedui101.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3085369818645393747/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://codedui101.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04334209659548606400</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3085369818645393747.post-3530668144070121761</id><published>2015-01-29T04:23:00.001-08:00</published><updated>2015-01-29T04:23:50.625-08:00</updated><title type='text'>Greetings</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hi there everyone.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Many thanks for supporting my blog over there years even though I had only posted two articles.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I do hope that they are still relevant even though Coded UI has changed a bit.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I have noticed in the last couple of weeks that there has been an increase in activity on the blog and I really hope that the contents are useful.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Also please do not click on any ads unless you really are interested in it. It throws off the stats quite a bit.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Other than that, please do have fun and remember if anyone wants to be a guest blogger, please do let me know.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Regards&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Tim&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;http://codedui101.blogspot.com&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codedui101.blogspot.com/feeds/3530668144070121761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codedui101.blogspot.com/2015/01/greetings.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3085369818645393747/posts/default/3530668144070121761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3085369818645393747/posts/default/3530668144070121761'/><link rel='alternate' type='text/html' href='http://codedui101.blogspot.com/2015/01/greetings.html' title='Greetings'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04334209659548606400</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3085369818645393747.post-2217580470609482889</id><published>2011-08-15T00:31:00.000-07:00</published><updated>2011-08-15T00:31:33.409-07:00</updated><title type='text'>Want to be a guest writer on our blog?</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hi All,&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;We are looking for guest bloggers to write regular features for our blog.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you are a subject matter expert and if you have what it takes, then feel free to send us links to any of your published work, or even just a mock article so that we can assess your skills.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If anyone is interested, please inbox me.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Regards&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Lefty&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;http://codedui101.blogspot.com&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codedui101.blogspot.com/feeds/2217580470609482889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codedui101.blogspot.com/2011/08/want-to-be-guest-writer-on-our-blog.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3085369818645393747/posts/default/2217580470609482889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3085369818645393747/posts/default/2217580470609482889'/><link rel='alternate' type='text/html' href='http://codedui101.blogspot.com/2011/08/want-to-be-guest-writer-on-our-blog.html' title='Want to be a guest writer on our blog?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04334209659548606400</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3085369818645393747.post-9154764331509942494</id><published>2011-07-10T18:02:00.000-07:00</published><updated>2011-07-15T09:34:48.472-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Assertions"/><category scheme="http://www.blogger.com/atom/ns#" term="CodedUI"/><category scheme="http://www.blogger.com/atom/ns#" term="Test Builder"/><category scheme="http://www.blogger.com/atom/ns#" term="UIMap"/><title type='text'>Creating our first Coded UI test</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Many of us find that as we spend time with a particular tool, the more comfortable we become with understanding the abilities of that tool. We also tend to look for ways to use those tools efficiently to make our jobs all the more easier.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This tutorial aims to help us become comfortable with CodedUI and will demonstrate how to go about creating a basic CodedUI test based on a simple application that was created for this exercise. For the purpose of this exercise we will create the test using the CodedUI Test Builder. The Test Builder will allow us to record actions, add assertions and even generate code from our interaction with the UI of that application.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;During this tutorial we will cover the following areas:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Creating test projects&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Adding CodedUI tests to that project&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Using the CodedUI Test Builder to drive the interface&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Adding assertions to our test&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Executing the CodedUI_Demo test&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Step 1 - Prepping the test environment&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;We need to ensure that we have the following pre-requisites deployed onto our test machine. We will be using the CodedUI_Demo application as our Application Under Test and for the purpose of transparency, we have included the source code as part of the download.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Visual Studio 2010 Premium or Ultimate needs to be installed on your test machine&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;a href=&quot;https://docs.google.com/leaf?id=0B9gkXxPXq5nbNzAwYmZhYWEtY2UwMi00NjRjLWE5YjYtMjYyNzVhZmYyZDRl&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot;&gt;CodedUI_Demo&lt;/a&gt; application needs to be downloaded to your machine and extracted to the working directory where we will store our CodedUI tests.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Step 2 - Creating a new Test Project&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Creating a Test Project which is separate from the development code base is usually a good idea. This allows us to use our projects a bit more flexibly when we want to execute our CodedUI tests, both as test packs through Visual Studio and also through automated deployments using Lab Manager.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;2.1. To create a test project do the following:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Launch Visual Studio 2010&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click &lt;b&gt;File -&amp;gt; New&lt;/b&gt;, and select &lt;b&gt;Project &lt;/b&gt;from the menu.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click on &lt;b&gt;Installed Templates&lt;/b&gt;, choose the language of your choice (VB.net for this exercise), and click on &lt;b&gt;Test. &lt;/b&gt;Select &lt;b&gt;Test Project&lt;/b&gt; from the results menu.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Thereafter you need to complete &lt;b&gt;Name &lt;/b&gt;of the project which will automatically populate the solution name.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click the &lt;b&gt;OK&lt;/b&gt; button and you will have a brand spanking new Test Project.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX1ELSMSRv11k1vlDpF3dM8ZUMdYE5A2usjNjgoPrhbo6psbIyX6tPtmTHc0kL_uC5YpOogXhZZo8qlIy9VQDJ580JToZU2hzxCCZcYLQc_0dfqGp5Xopb1I7PsX6e8Cqpt6Ua4IMq0Wtl/s1600/Create+New+Project+-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX1ELSMSRv11k1vlDpF3dM8ZUMdYE5A2usjNjgoPrhbo6psbIyX6tPtmTHc0kL_uC5YpOogXhZZo8qlIy9VQDJ580JToZU2hzxCCZcYLQc_0dfqGp5Xopb1I7PsX6e8Cqpt6Ua4IMq0Wtl/s400/Create+New+Project+-1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;Figure 1: Create Test Policy&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Step 3 - Adding CodeUI tests to a project&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now that we have our project, we want to start adding lots of lovely tests. We can do this either by adding the CodedUI test directly from the &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Test &lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;drop down menu or we could add it to the project by right-clicking on the project and adding the test there.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;3.1. To add a CodedUI test from the &lt;b&gt;Test &lt;/b&gt;drop down menu we will need to do the following:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Open test project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Test -&amp;gt; New Test &lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;and select CodedUI test.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Input an appropriate &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Test Name &lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;and ensure that the test will be added to the correct project.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;OK&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;At this stage we are ready to commence creating our automated test and a code generation form is displayed with two options. A CodedUI test can either be created by recording actions using the CodedUI Test Builder or by using previously created action recordings from Test Manager. There is also another means to create CodedUI tests which will cater to the more technically advanced individuals. We will discuss this later on in the series.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Using the recording options above offers us two different ways to create automated tests. Each has its advantages and disadvantages but they in essence provide us with the ability to create detailed automated tests.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;After adding the CodedUI test structure to the project, a code generation form is displayed which asks the user to choose an appropriate generation technique, which we will discuss in the next step.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilKtj44ZliAmFzl6HW9U5DvfBF3BO875XCI7sltI4RTfE2poqM7OF087Xlk_BXv2eqCRkRfkzfu8P7SFVbRXCx8y1iESAFnh-5RvorBeABuOe8Jj2iVKpnMJpajUXTL_3byKm5bIYulCwM/s1600/RecordOrUseExistingActionRecordingMenu.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;203&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilKtj44ZliAmFzl6HW9U5DvfBF3BO875XCI7sltI4RTfE2poqM7OF087Xlk_BXv2eqCRkRfkzfu8P7SFVbRXCx8y1iESAFnh-5RvorBeABuOe8Jj2iVKpnMJpajUXTL_3byKm5bIYulCwM/s320/RecordOrUseExistingActionRecordingMenu.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Step 4 - Using the CodedUI Test Builder to drive the user interface.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;As mentioned in the step above we have the two main options with which to create a CodedUI test. For this example we will use the following option &quot;Record Actions, edit UI Map or add assertions&quot;. This option will give us quite a lot of control over what we want to record and how we create methods and assertions.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;4.1. We will be creating a test using the CodedUI Demo application which was mentioned in Step 1 and test methods will be generated for the following actions:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Launch CodedUI_Demo.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Input a First Name.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Input a Surname.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Input an Age.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click on Submit to concatenate all strings and output to a control.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Verify that the concatenated string is displayed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Close CodedUI_Demo&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;4.2. We will now begin recording the actions mentioned above.&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Select &lt;b&gt;&quot;Recorded Actions, edit UIMap or add assertions&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&quot;&lt;/b&gt; and click OK.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;A small floating toolbar is displayed at the bottom right hand corner of the screen. This is the Test Builder. Click on the &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Record&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; button.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Go to &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Start -&amp;gt;Search bar -&amp;gt; {path of CodedUI_Demo}&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; and launch the test application.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click on &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Generate Code&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt; button. Enter &quot;LaunchApplication&quot; as the method name and click on &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Generate.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Enter a First Name into the First Name text box and click on Generate Code. Name this method &quot;InputFirstName&quot;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Enter a Surname into the Surname text box and click on Generate Code. Name this method &quot;InputSurname&quot;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Enter an Age into the Age text box and click on Generate Code. Name this method &quot;InputAge&quot;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click on the Submit button. The concatenated output is displayed on the disable text box. Click Generate Code and name this method &quot;ClickSubmit&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;At this point out CodedUI_Demo app should look something like this after all the data has been entered and submitted.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPFB_VqrLn1vGue9xfYZVj3zLf2AcvLE2BgPggiiWnMMdNwpOwfRhCGPM8jq0T_s-tpHDYBLnWdLcp5QIvWgxxFidmDOnqTCM8C6bQvulUKn0Bs8_25aBouFK7nGQMrF1WSlRjnLNLsiNd/s1600/DemoAppBeforeAssertion.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;165&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPFB_VqrLn1vGue9xfYZVj3zLf2AcvLE2BgPggiiWnMMdNwpOwfRhCGPM8jq0T_s-tpHDYBLnWdLcp5QIvWgxxFidmDOnqTCM8C6bQvulUKn0Bs8_25aBouFK7nGQMrF1WSlRjnLNLsiNd/s320/DemoAppBeforeAssertion.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Step 5 - Adding Assertions to our test&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Next we need to add the assertion on the disable text box, which is essentially a verification point for this test.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click the Cross hair on Test Builder and drag it onto the text box. It should look like this with a blue boxy highlight around the selected control.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMEGpyUPer2YI4-3RzOydQ7_Rqx_ero4zTPGcDN3_GJvJkeic0KTc8xmvWN_LvOVUDYTXnEvG-zitFoe3cJ2XYrQAr_l6q6XqGefhGVcqLFA7A_p6rCQqyCJIvL5fgxyuwXDwOk0Aqqh8p/s1600/AddedAssertion.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMEGpyUPer2YI4-3RzOydQ7_Rqx_ero4zTPGcDN3_GJvJkeic0KTc8xmvWN_LvOVUDYTXnEvG-zitFoe3cJ2XYrQAr_l6q6XqGefhGVcqLFA7A_p6rCQqyCJIvL5fgxyuwXDwOk0Aqqh8p/s400/AddedAssertion.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Click Generate Code and name the assertion &quot;VerifyIfOutputIsDisplayed&quot;. Click on Generate thereafter.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Finally we should close the application. All we have to do at this stage is click the Close button on the demo application and Click Generate Code. Name this method &quot;CloseApplication&quot;. Click on Generate and close the Test Builder.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;After we close the Test Builder, the CodedUITest1.vb file is displayed along with all the generated method invocations within a Test Method, which is within a Test Class. This is what the test looks like at this stage. Note the references that are automatically added to the test as well as the comments in green which I added to neaten up the test a bit.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8EEOS0rM3mNwJGRn-uMjO1-U-50KHYw7VdiECKArC-_f3rCBf-oUaDi_-PfQvjLbfhNQYtlu996cJtUTej2c0mvmx2nRGNtvGemWiZgZmvIVZjaoK9z5Pa-2Q8AIAhYpWS6KUOD1ZqM8S/s1600/AfterRecording.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;244&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8EEOS0rM3mNwJGRn-uMjO1-U-50KHYw7VdiECKArC-_f3rCBf-oUaDi_-PfQvjLbfhNQYtlu996cJtUTej2c0mvmx2nRGNtvGemWiZgZmvIVZjaoK9z5Pa-2Q8AIAhYpWS6KUOD1ZqM8S/s320/AfterRecording.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;A UIMap.uitest file was also created during the recording phase which stores a XML representation of the Window/control/property&amp;nbsp;hierarchy. Visual Studio 2010 Feature Pack 2 allows us to view the UIMap.uitest as a tree structure. This is especially handy if the UIMap becomes quite expansive, although we can have multiple UIMaps - More on that later on in the series.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;Step 6 - Executing the CodedUI_Demo test&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now that we have completed the recordings and have added assertions to the test, it is now ready for execution.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;To execute the test, &lt;b&gt;Click Test -&amp;gt; Run -&amp;gt; Tests in Current Context &lt;/b&gt;or use the hot keys&amp;nbsp;(Ctrl + R,T).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;The test will begin execution and execute all the methods, keeping a record of the execution. After the test run has completed, the results can be viewed and will look like this:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhreTXnFPmHo7yqu5honni3vEl6c9YW-VkAivAyONhIrrvrtISxyH5WR5WPSBHl0iACmTnIlSWcVCt_i7TcY5Q-tPb_XGO7GjzHD7fQCB-Cbqs0acRGX1KKb7Kv8Jz1mZGE-cPf1jCAnQ_6/s1600/TestResults.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;171&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhreTXnFPmHo7yqu5honni3vEl6c9YW-VkAivAyONhIrrvrtISxyH5WR5WPSBHl0iACmTnIlSWcVCt_i7TcY5Q-tPb_XGO7GjzHD7fQCB-Cbqs0acRGX1KKb7Kv8Jz1mZGE-cPf1jCAnQ_6/s400/TestResults.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Congratulations, you have now created your first CodedUI test :) I hope that you have found the experience fun, informative and just plain simple.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;My next post in the series will cover UIMap customisation and writing additional code to make our tests more maintainable.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Happy Testing!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Lefty&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;http://codedui101.blogspot.com&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codedui101.blogspot.com/feeds/9154764331509942494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codedui101.blogspot.com/2011/07/creating-our-first-codedui-test.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3085369818645393747/posts/default/9154764331509942494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3085369818645393747/posts/default/9154764331509942494'/><link rel='alternate' type='text/html' href='http://codedui101.blogspot.com/2011/07/creating-our-first-codedui-test.html' title='Creating our first Coded UI test'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04334209659548606400</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX1ELSMSRv11k1vlDpF3dM8ZUMdYE5A2usjNjgoPrhbo6psbIyX6tPtmTHc0kL_uC5YpOogXhZZo8qlIy9VQDJ580JToZU2hzxCCZcYLQc_0dfqGp5Xopb1I7PsX6e8Cqpt6Ua4IMq0Wtl/s72-c/Create+New+Project+-1.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3085369818645393747.post-1853736365187050448</id><published>2011-07-09T16:54:00.000-07:00</published><updated>2011-07-15T09:35:30.033-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodedUI"/><title type='text'>What is Coded UI?</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;For many years the QA industry has used been dominated by HP, IBM and other software vendors that offered up their solutions to automated testing, and more specifically automated testing of user interfaces.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Now Microsoft has joined in the fray and wants a piece of the valuable candy, a piece of the QA industry. With the introduction of CodedUI as an integrated component of Visual Studio Premium and Ultimate, Microsoft now has the ability to offer a fresh alternative to HP&#39;s QuickTest Professional, IBM Rational Functional Tester and other lovely tools.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;The anatomy of a CodedUI test is quite simple and can be broken down into the following files:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;UIMap.uitest: Contains an XML representation of the UIMap class which includes windows, controls, properties, methods, assertions and actions.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcyoNl6oiJY8GYhBPe6LFRcbw7jooVJkdcgvSkr_jTgrVIYedSxu2j4KI5dfJ520Z68kHbkjYp5vEMyOOkFUwLBuch5Tdgic14ZJFD8Odmveaz9DxLj5Yus6oSJqBWfyhxNIzFpzJ5U-y0/s1600/UIMap.uitest.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5627495124656466482&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcyoNl6oiJY8GYhBPe6LFRcbw7jooVJkdcgvSkr_jTgrVIYedSxu2j4KI5dfJ520Z68kHbkjYp5vEMyOOkFUwLBuch5Tdgic14ZJFD8Odmveaz9DxLj5Yus6oSJqBWfyhxNIzFpzJ5U-y0/s320/UIMap.uitest.jpg&quot; style=&quot;cursor: pointer; display: block; height: 200px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;Figure 1: UIMap.uitest&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;UIMap.designer.vb: The designer contains the code view of the UIMap which is usually generated when a tester records some UI interaction or when objects are manually added to the UIMap.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik0TQRo8KxFJj1nhVK76x3rozs1-hHFl1AxjAZTiuvJHzaVOEgrOlZVQlYd6A1VFYiZ8hKAVS-mjb7miZFKkZ8UyQLRhnOb-Cabn3bXcRi6ltBAw3k2n4egaOLM9zuX25P8xWBqZJM74KX/s1600/UIMap.Designer.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5627496279107323618&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik0TQRo8KxFJj1nhVK76x3rozs1-hHFl1AxjAZTiuvJHzaVOEgrOlZVQlYd6A1VFYiZ8hKAVS-mjb7miZFKkZ8UyQLRhnOb-Cabn3bXcRi6ltBAw3k2n4egaOLM9zuX25P8xWBqZJM74KX/s320/UIMap.Designer.jpg&quot; style=&quot;cursor: pointer; display: block; height: 218px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Figure 2: UIMap.Designer.vb&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;UIMap.vb: Any customization done to the UIMap are to be stored in this file. If changes are made directly to the UIMap.designer.vb file, those changes will be lost if a recording is done, as the file is regenerated. The screenshot below shows essentially a blank file. We will populate this file in the future parts of the tutorial.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3ulVwkBAao1CFTy0gthNsW4RcJUbSbaAU2EnLtzgaYlfE_QnCSB0ZkT8xWvhxoQvPv9QmXeVMEjlyFfqf_gVO300QTfacKGpifG6dQmsXA7unKM7SGzaZ9ValRrKz0xFl7_QCVLI5txg9/s1600/UIMap.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5627497003966838082&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3ulVwkBAao1CFTy0gthNsW4RcJUbSbaAU2EnLtzgaYlfE_QnCSB0ZkT8xWvhxoQvPv9QmXeVMEjlyFfqf_gVO300QTfacKGpifG6dQmsXA7unKM7SGzaZ9ValRrKz0xFl7_QCVLI5txg9/s320/UIMap.jpg&quot; style=&quot;cursor: pointer; display: block; height: 208px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;Figure 3: UIMap.vb&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;CodedUITest1.vb: Contains the actual CodedUI test class, method invocation, and assertion invocation. All methods and assertions are by default invoked from the UIMap.designer.vb file.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRemxtCFKKlUZzir7WBI2sMzapaZP5-aAkeVzfBJwYf7kw04jFJNu41FVPOjyL8asTusCDcP3YYSRXgzrXOIhMinsQx2kNFeK_18e6UYTkMJX0ZPErt6AHSUXo3MEevaqTvGBXstFegjr/s1600/CodedUITest1.jpg&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5627493942634134722&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRemxtCFKKlUZzir7WBI2sMzapaZP5-aAkeVzfBJwYf7kw04jFJNu41FVPOjyL8asTusCDcP3YYSRXgzrXOIhMinsQx2kNFeK_18e6UYTkMJX0ZPErt6AHSUXo3MEevaqTvGBXstFegjr/s320/CodedUITest1.jpg&quot; style=&quot;cursor: pointer; display: block; height: 198px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: justify; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;&lt;i&gt;Figure 4: CodedUITest1.vb&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;As you can see, the overall structure of a test is very simple and logically outlined. This makes the initial phases of UI automation fairly quick while offering great flexibility with the ability to write customized code behind the test methods.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Anyways, I hope this serves as a good introduction to CodedUI. The next post in this series will cover creation of CodedUI tests using the CodedUI Test Builder.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Happy testing!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Lefty&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;http://codedui101.blogspot.com&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codedui101.blogspot.com/feeds/1853736365187050448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codedui101.blogspot.com/2011/07/what-is-codedui.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3085369818645393747/posts/default/1853736365187050448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3085369818645393747/posts/default/1853736365187050448'/><link rel='alternate' type='text/html' href='http://codedui101.blogspot.com/2011/07/what-is-codedui.html' title='What is Coded UI?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04334209659548606400</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcyoNl6oiJY8GYhBPe6LFRcbw7jooVJkdcgvSkr_jTgrVIYedSxu2j4KI5dfJ520Z68kHbkjYp5vEMyOOkFUwLBuch5Tdgic14ZJFD8Odmveaz9DxLj5Yus6oSJqBWfyhxNIzFpzJ5U-y0/s72-c/UIMap.uitest.jpg" height="72" width="72"/><thr:total>3</thr:total></entry></feed>