<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Vincent Sibal's Blog : TestApi</title><link>http://blogs.msdn.com/vinsibal/archive/tags/TestApi/default.aspx</link><description>Tags: TestApi</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>New and updated test tools for WPF: TestApi v0.3 and WPF Control Verifier</title><link>http://blogs.msdn.com/vinsibal/archive/2009/08/04/new-and-updated-test-tools-for-wpf-testapi-v0-3-and-wpf-control-verifier.aspx</link><pubDate>Tue, 04 Aug 2009 15:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9857068</guid><dc:creator>vinsibal</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vinsibal/comments/9857068.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vinsibal/commentrss.aspx?PostID=9857068</wfw:commentRss><wfw:comment>http://blogs.msdn.com/vinsibal/rsscomments.aspx?PostID=9857068</wfw:comment><description>&lt;P&gt;&lt;STRONG&gt;TestApi v0.3&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The WPF test team has recently released a new version of TestApi!&amp;nbsp; This version includes libraries for fault injection, combinatorial varitation generation, new application control APIs, and updated tests and documentation.&amp;nbsp; I think all the new libraries are really cool, especially the fault injection libraries.&amp;nbsp; Learn more about it &lt;A href="http://testapi.codeplex.com/" mce_href="http://testapi.codeplex.com/"&gt;here&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;WPF Control Verifier&amp;nbsp;v0.1&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In addition to TestApi, the test team has also developed a tool to verify the behavior of WPF controls.&amp;nbsp; &lt;A href="http://wpf.codeplex.com/Wiki/View.aspx?title=WPF%20Control%20Verifier" mce_href="http://wpf.codeplex.com/Wiki/View.aspx?title=WPF%20Control%20Verifier"&gt;WPF Control Verifier&lt;/A&gt; is a tool that verifies the correctness of WPF Controls. This tool is geared towards WPF Control developers with the goal of providing a set of verifications that all controls can run and consume. Version 0.1 includes one category for verification – default style verification. These tests verify that your control can be styled such that its dependency properties are inheriting or template binding correctly. Future versions will include additional categories of verification.&amp;nbsp; You can download the tool &lt;A href="http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=30923" mce_href="http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=30923"&gt;here&lt;/A&gt;.&amp;nbsp; This is our first beta and we will be updating it based on your feedback. We have a planned set of features for future iterations but this will evolve based on your suggestions. Please send your feedback to wpfcvt@microsoft.com.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9857068" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vinsibal/archive/tags/TestApi/default.aspx">TestApi</category><category domain="http://blogs.msdn.com/vinsibal/archive/tags/ControlVerifier/default.aspx">ControlVerifier</category></item><item><title>WPF TestApi v0.2 has released!</title><link>http://blogs.msdn.com/vinsibal/archive/2009/04/24/wpf-testapi-v0-2-has-released.aspx</link><pubDate>Fri, 24 Apr 2009 20:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9567088</guid><dc:creator>vinsibal</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vinsibal/comments/9567088.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vinsibal/commentrss.aspx?PostID=9567088</wfw:commentRss><wfw:comment>http://blogs.msdn.com/vinsibal/rsscomments.aspx?PostID=9567088</wfw:comment><description>&lt;P&gt;The WPF test team is hard at work to provide value through a simple and componetized library of&amp;nbsp;public test APIs.&amp;nbsp; The &lt;A class="" href="http://www.codeplex.com/TestApi" mce_href="http://www.codeplex.com/TestApi"&gt;WPF TestAp&lt;/A&gt;i library has just released a &lt;A class="" href="http://testapi.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=26566" mce_href="http://testapi.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=26566"&gt;v0.2&lt;/A&gt; which includes new visual verification features, command line parsing features, an auomated application controller, and new unit test samples.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Ivo has a great post about the visual verification APIs and usage&amp;nbsp;that you can view &lt;A class="" href="http://blogs.msdn.com/ivo_manolov/archive/2009/04/20/9557563.aspx" mce_href="http://blogs.msdn.com/ivo_manolov/archive/2009/04/20/9557563.aspx"&gt;here&lt;/A&gt;.&amp;nbsp; Please try it out and let us know your feedback!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9567088" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vinsibal/archive/tags/TestApi/default.aspx">TestApi</category></item><item><title>WPF TestApi and DataGrid Sample</title><link>http://blogs.msdn.com/vinsibal/archive/2008/12/10/wpf-testapi-and-datagrid-sample.aspx</link><pubDate>Wed, 10 Dec 2008 19:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9191609</guid><dc:creator>vinsibal</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vinsibal/comments/9191609.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vinsibal/commentrss.aspx?PostID=9191609</wfw:commentRss><wfw:comment>http://blogs.msdn.com/vinsibal/rsscomments.aspx?PostID=9191609</wfw:comment><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;Our WPF Test team has just released a library of tools that can be leveraged to test WPF applications.&amp;nbsp; What's really cool is that these are utilities that we use internally and now we can push them out to external customers for feedback and usage.&amp;nbsp; The library currently lives here on codeplex,&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt; &lt;A href="http://www.codeplex.com/TestApi" mce_href="http://www.codeplex.com/TestApi"&gt;http://www.codeplex.com/TestApi&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;.&amp;nbsp; There are a couple more blog posts where you can get more information about it.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://blogs.msdn.com/llobo/archive/2008/12/08/wpf-test-helper-library.aspx" mce_href="http://blogs.msdn.com/llobo/archive/2008/12/08/wpf-test-helper-library.aspx"&gt;http://blogs.msdn.com/llobo/archive/2008/12/08/wpf-test-helper-library.aspx&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: purple; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://blogs.msdn.com/wpfsdk/archive/2008/12/09/testapi-released.aspx" mce_href="http://blogs.msdn.com/wpfsdk/archive/2008/12/09/testapi-released.aspx"&gt;http://blogs.msdn.com/wpfsdk/archive/2008/12/09/testapi-released.aspx&lt;/A&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;The &lt;A href="http://www.codeplex.com/TestApi/Release/ProjectReleases.aspx?ReleaseId=20207" mce_href="http://www.codeplex.com/TestApi/Release/ProjectReleases.aspx?ReleaseId=20207"&gt;download&lt;/A&gt; contains some samples but I thought I would show a sample with one of the DataGrid applications instead.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I made some small modifications to the SampleTestApp to get it working with one of my DataGrid samples.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In this sample, I am doing a visual verification test to check that the rows and cells update to the correct visual state when in edit mode.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I am using the in-proc, out of thread strategy which is similar to the strategy used in the visual verification in the SampleTestApp.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;To get the tests to work with the DataGridSample application, I needed to add automation id’s to some of the elements.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In particular, the Window and the DataGrid:&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: #4f6228 1pt dashed; PADDING-RIGHT: 5pt; BORDER-TOP: #4f6228 1pt dashed; PADDING-LEFT: 5pt; BACKGROUND: #f6f5f0; PADDING-BOTTOM: 5pt; MARGIN-LEFT: 0.1in; BORDER-LEFT: #4f6228 1pt dashed; MARGIN-RIGHT: 0in; PADDING-TOP: 5pt; BORDER-BOTTOM: #4f6228 1pt dashed; mso-border-alt: dash-small-gap #4F6228 .5pt; mso-element: para-border-div; mso-border-themecolor: accent3; mso-border-themeshade: 128"&gt;
&lt;P class=codesampleCxSpFirst style="BACKGROUND: #f6f5f0; MARGIN: 12pt 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Window&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; x&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Class&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;="DataGridSample.DataGridBasicSample"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;AutomationProperties.AutomationId&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: yellow; COLOR: blue; mso-highlight: yellow"&gt;="DataGridBasicSample"&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;…&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;dg&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;DataGrid&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; x&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;="DataGrid_Standard"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: yellow; COLOR: red; mso-highlight: yellow"&gt;AutomationProperties.AutomationId&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: yellow; COLOR: blue; mso-highlight: yellow"&gt;="DataGrid_Standard"&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;dg&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;:&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;DataGrid&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpLast style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 12pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Window&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;These IDs will be queried by my test in order to find the correct AutomationElements. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;And here is what the test will basically look like (left out logging and some error checking to make it more concise):&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: #4f6228 1pt dashed; PADDING-RIGHT: 5pt; BORDER-TOP: #4f6228 1pt dashed; PADDING-LEFT: 5pt; BACKGROUND: #f6f5f0; PADDING-BOTTOM: 5pt; MARGIN-LEFT: 0.1in; BORDER-LEFT: #4f6228 1pt dashed; MARGIN-RIGHT: 0in; PADDING-TOP: 5pt; BORDER-BOTTOM: #4f6228 1pt dashed; mso-border-alt: dash-small-gap #4F6228 .5pt; mso-element: para-border-div; mso-border-themecolor: accent3; mso-border-themeshade: 128"&gt;
&lt;P class=codesampleCxSpFirst style="BACKGROUND: #f6f5f0; MARGIN: 12pt 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// retrieve the necessary AutomationElements&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;AutomationElement&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; window = &lt;SPAN style="COLOR: #2b91af"&gt;AutomationUtilities&lt;/SPAN&gt;.FindElementsById(&lt;SPAN style="COLOR: #2b91af"&gt;AutomationElement&lt;/SPAN&gt;.RootElement, &lt;SPAN style="COLOR: #a31515"&gt;"DataGridBasicSample"&lt;/SPAN&gt;)[0];&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;AutomationElement&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; dataGrid = &lt;SPAN style="COLOR: #2b91af"&gt;AutomationUtilities&lt;/SPAN&gt;.FindElementsById(window, &lt;SPAN style="COLOR: #a31515"&gt;"DataGrid_Standard"&lt;/SPAN&gt;)[0];&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;GridPattern&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; grid = dataGrid.GetCurrentPattern(&lt;SPAN style="COLOR: #2b91af"&gt;GridPattern&lt;/SPAN&gt;.Pattern) &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;GridPattern&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;AutomationElement&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; cell = grid.GetItem(0, 0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// do action for making cell editable&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;AutomationHelpers&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;.MoveToAndDoubleClick(cell);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// Capture the actual pixels from the bounds of the screen rectangle&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Snapshot&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; actual = &lt;SPAN style="COLOR: #2b91af"&gt;Snapshot&lt;/SPAN&gt;.FromRectangle(&lt;SPAN style="COLOR: #2b91af"&gt;AutomationHelpers&lt;/SPAN&gt;.GetElementSize(dataGrid));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// Load the reference/master data from a previously saved file&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Snapshot&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; master = &lt;SPAN style="COLOR: #2b91af"&gt;Snapshot&lt;/SPAN&gt;.FromFile(&lt;SPAN style="COLOR: #2b91af"&gt;Path&lt;/SPAN&gt;.Combine(TestContext.TestDeploymentDir, &lt;SPAN style="COLOR: #a31515"&gt;"Master_EditTest1.png"&lt;/SPAN&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;if&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; (CompareImages(actual, master) == &lt;SPAN style="COLOR: #2b91af"&gt;VerificationResult&lt;/SPAN&gt;.Fail)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpMiddle style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 0pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #2b91af; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp; &lt;/SPAN&gt;Assert&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;.Fail(&lt;SPAN style="COLOR: #a31515"&gt;"Initial State test failed. Actual should look like Master image. Refer to logged images under:"&lt;/SPAN&gt; + TestContext.TestLogsDir);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=codesampleCxSpLast style="BACKGROUND: #f6f5f0; MARGIN: 0in 0in 12pt; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 125%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;}&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Download the full sample &lt;A class="" href="http://blogs.msdn.com/vinsibal/attachment/9191609.ashx" mce_href="http://blogs.msdn.com/vinsibal/attachment/9191609.ashx"&gt;here&lt;/A&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We would love to hear your feedback.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9191609" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/vinsibal/attachment/9191609.ashx" length="817695" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/vinsibal/archive/tags/DataGrid/default.aspx">DataGrid</category><category domain="http://blogs.msdn.com/vinsibal/archive/tags/DataGrid+Samples/default.aspx">DataGrid Samples</category><category domain="http://blogs.msdn.com/vinsibal/archive/tags/TestApi/default.aspx">TestApi</category></item></channel></rss>