From 676070dddc0a9c094ad2a6ed789cfc12f7189f8e Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Wed, 31 Jul 2013 11:09:32 +0100 Subject: [PATCH] Trying to track down this null reference exeception --- .../AutomationElementSearch/AutomationElementFinder.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/TestStack.White/AutomationElementSearch/AutomationElementFinder.cs b/src/TestStack.White/AutomationElementSearch/AutomationElementFinder.cs index 1e0d8687..0d3a37ce 100644 --- a/src/TestStack.White/AutomationElementSearch/AutomationElementFinder.cs +++ b/src/TestStack.White/AutomationElementSearch/AutomationElementFinder.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Windows.Automation; @@ -14,6 +15,7 @@ public class AutomationElementFinder public AutomationElementFinder(AutomationElement automationElement) { + if (automationElement == null) throw new ArgumentNullException("automationElement"); this.automationElement = automationElement; }