Skip to content

Commit ed283da

Browse files
committed
default to NullActionListener shall the UIItem (root container) be created without IActionListener
1 parent 1479e24 commit ed283da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TestStack.White/UIItems/UIItem.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public UIItem(AutomationElement automationElement, IActionListener actionListene
5151
{
5252
if (null == automationElement) throw new NullReferenceException();
5353
this.automationElement = automationElement;
54-
this.actionListener = actionListener;
54+
this.actionListener = actionListener ?? new NullActionListener();
5555
factory = new PrimaryUIItemFactory(new AutomationElementFinder(automationElement));
5656
}
5757

0 commit comments

Comments
 (0)