Original Question
I have this expandable folder UIObject that I need to be able to expand to show all the subfolders. It can not be double clicked as this does not expand the folders. I saw from this documentation, https://admhelp.microfocus.com/leanft/en/14.02/NetSDKReference/HP.LFT.SDK~HP.LFT.SDK.Java.ITreeView.html as well as some others that there is a concept of an ITreeView and an ITreeViewNode.
How can I expand this element? I really just need some examples in code of how we can take an object, defeine it as a ITreeView and ITreeView node and expand it.
Result
Even though it is not the best solution, it is possible to do this using the Workaround suggested below and this is the method that made it happen
public void ExpandFolder(int index)
{
IUiObject folder = ViewPage.FolderExplorer.Describe<IUiObject>(new UiObjectDescription
{
ObjectName = "TreeViewItem",
Index = (uint)index
});
var expandButton = folder.AbsoluteLocation;
expandButton.X = expandButton.X + 2;
expandButton.Y = expandButton.Y + 4;
Mouse.Click(expandButton);
GeneralUtilities.Sleep(1);
}
In this case, there was a small drop down arrow to the left of the element. I couldn't identify that, so I identified the folder and manipulated the click. If anyone stumbles upon this and knows a more direct way to do this using LeanFT I would very much like to see an example. If not, and you are here trying to find help - I hope this helps you!