TestStack White: Find Elements using AutomationElement Extensions

Have you ever faced the issue where finding an UI element using TestStack White SearchCriteria API returns null? If yes, here are few alternatives that utilises the AutomationElement.

The alternative approach uses AutomationElement which is part of the Microsoft UI Automation API. Simply, it iterates through the children elements of AutomationElement of the White…

WPF ItemsControl with TestStack White

Problem If you are reading this blog most likely means you have been through the same unsuccessful experience I had of trying to get a WPF ItemsControl control via automation ID using TestStack.White API (v0.13.3) in order to carry on some UI test automation.

Acquiring a WPF ListBox via automation ID using White is simple job.…

Insights on Linq Count() vs Count Property

In this post I am investigating the difference between Count property and Count() extension method of the .NET enumerable. Below code snippet sets the scene of what we trying to answer.

As in the previous post will start by decompiling the System.Core 4.0.0.0 dll.

The Linq Count() extension method behaves differently based on the…

Insights on Linq Any() Performance

The Enumerable.Any<TSource>() is an extension method that lives in System.Core assembly under System.Linq namespace. If you are wondering what happens with the extended enumerable source then this is the right post. In the right gets enumerated or not then we would have to look at the implementation. In System.Core 4.0.0.0 the Any(…) method comes with two overloads which is worth investigating. Simply…

Insights on .NET Concurrency: Reactive Programming

Intro This is the last form of concurrency we are going to cover in Insights on .NET Concurrency series. Reactive programming is a programming paradigm that is built on the concept of asynchronous data streams. Each asynchronous event feeds into a stream of events, where the stream can be observed, composed, manipulated, filtered etc. Its key characteristic is…

Infragistics XamDataGrid – Dynamic Columns using Attached Behavior

I am sharing the code of an Attached Behavior that dynamically populates the columns of an Infragistics data grid; XamDataGrid Control. This post is based on XamDataGrid–Dynamically Create and Data Bind Columns with an Editor of your Choice.   So What’s New Here? The dynamic column creation implementation is packaged up in an extensible and unit testable…

Insights on .NET Concurrency: Asynchronous Programming

Intro In this post of the concurrency series we will provide insights on asynchronous programming. So what is asynchrony? Succinctly, is about not blocking the thread that initiates an operation. The key difference between synchronous and asynchronous is that the latter can start a new operation before the first one completes. For example, a user clicks on a button to fetch…

Prism: Why Service Locator Matters with Multiple Shells

Scenario You are working on a WPF composite application built with Prism bootstrapped with UnityBoostrapper, and you try to launch a second isolated/standalone WPF Prism composite app also bootstrapped with UnityBoostrapper, so the two windows are open at the same time. At this stage the second window is behaving properly i.e. views get navigated to the appropriate regions. So…

Insights on .NET Concurrency: Parallel Programming

Intro Parallel programming is the next post from the Insights on .NET Concurrency series. Parallelism is about making more than one thing happen at the same time, with the main objective being improve the performance of CPU bound operations. Parallel programming model tries to overcome single core limitations. With parallelism we can process larger more complex problems in a more…