I am trying to retrieve a White.Core.UIItems.TablItems.Tab UI element, but I am getting a Castle.Proxies.TabPageProxy type. It won't let me cast this. How can I fix this? I just want to get a Tab UI item.
SearchCriteria crit = SearchCriteria.ByAutomationId("StatusTab");
White.Core.UIItems.IUIItem item = window.Get(crit);
White.Core.UIItems.TabItems.Tab tab = item;
item returned is a Castle.Proxies.TabPageProxy type. So I get this exception:
Exception: System.InvalidCastException: Unable to cast object of type
'Castle.Proxies.TabPageProxy' to type 'White.Core.UIItems.TabItems.Tab'.
I tried to put a "using" declaration in my code for Castle.Proxies, but that is apparently not in Castle.Core or Castle.DynamicProxy2 dlls.