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; }