-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when expanding tree node #169
Comments
Also tried casting it to WPFTreeNode and execute Click on it, I get another NRE, different call stack: at TestStack.White.UIItems.TreeItems.WPFTreeNode.get_SelectPoint() in c:\TeamCity\buildAgent\work\77ff376102fcfa6f\src\TestStack.White\UIItems\TreeItems\WPFTreeNode.cs:line 19 |
Trying different approaches and found out that using UIAutomationVerify I can invoke ExpandCollapsePattern and it does work. |
That line is Is there a custom style on this treeview and the button has been removed from the treeitem? |
Sorry, after that line, so null is being returned from GetExpandCollapseButton() As a workaround you can always access the automation element directly, then use the ExpandCollapsePattern |
@JakeGinnivan Yes, this is DevExpress tree control (custom control) and not exactly WPF tree control, but it still exposes the same control type through automation API. As a workaround I created extension methods for TreeNode that'd use ExpandCollapsePattern. |
Any reason I'm getting this exception when expanding a tree node (WPF app)? I do have reference to the "TreeNode" object and will get a NRE when executing Expand method on it. I'm using version 0.11.0.207.
System.NullReferenceException was unhandled by user code
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=TestStack.White
StackTrace:
at TestStack.White.UIItems.TreeItems.WPFTreeNode.DoExpand() in c:\TeamCity\buildAgent\work\77ff376102fcfa6f\src\TestStack.White\UIItems\TreeItems\WPFTreeNode.cs:line 26
at TestStack.White.UIItems.TreeItems.TreeNode.Expand() in c:\TeamCity\buildAgent\work\77ff376102fcfa6f\src\TestStack.White\UIItems\TreeItems\TreeNode.cs:line 83
at TestStack.White.Bricks.DelegateInvoker.VoidActionInvokerWrapper.Call(Object[] args) in c:\TeamCity\buildAgent\work\77ff376102fcfa6f\src\TestStack.White\Bricks\DelegateInvoker.cs:line 309
at TestStack.White.Bricks.DynamicProxyInterceptors.Process(IInvocation invocation, CoreInterceptContext interceptedContext) in c:\TeamCity\buildAgent\work\77ff376102fcfa6f\src\TestStack.White\Bricks\DynamicProxyInterceptors.cs:line 21
at TestStack.White.Interceptors.CoreInterceptor.Intercept(IInvocation invocation) in c:\TeamCity\buildAgent\work\77ff376102fcfa6f\src\TestStack.White\Interceptors\CoreInterceptor.cs:line 31
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.WPFTreeNodeProxy.Expand()
at NServiceBus.Profiler.FunctionalTests.Parts.LayoutManager.ActivateQueueExplorer() in c:\Projects\NSBProfiler\NServiceBus.Profiler.FunctionalTests\Parts\LayoutManager.cs:line 50
The text was updated successfully, but these errors were encountered: