I am using white for my UI automation. I have a large tree as given below
Node1 has one child Node2
Node2 has 1000 children
The tree is already expanded and tree is visible till childNode20 from start in the view.When i try to call TreeHandle.Node(); The tree start fluctuating (Size scrollbar start moving) and finaly fails.
My code is
var TreeHandle = mainWindow.Get<Tree>(AutomationIdOfTree);
var node= TreeHandle.Node(nodePath.Split('\\'));
It is failing in step3 which is have marked green.
This code is working fine with small trees.
I tried to debug the source code and i found that when i am calling
TreeHandle.Node() it is internally calling Nodes.GetItem(nodePath);
And in GetItem there is one function called node.Expand();
inside that it is calling actionListener.ActionPerforming(this);
inside that it is calling ScreenItem(uiItem, ScrollBars).MakeVisible(this);
now inside MakeVisible function it is scrolling the scroll-bar till verticalSpan.DoesntContain(bounds) become true.
Now inside that function it is trying to bring the BoundingRectangle of my
Node1 inside start and end of VerticalSpan and since bounding rectangle is very large it not able to bring that inside VerticalSpan limit. So it is giving time out.
So is there any way to fix this issue without changing the tree.