ViewItem

Lookup
Section titled “Lookup”The best way to get an item reference is to use the findItem method from ViewSection.
const viewSection = ...;const item = await viewSection.findItem('package.json');Actions
Section titled “Actions”// get item's labelconst label = await item.getLabel();// get item's description if presentconst description = await item.getDescription();// find if the item can be expandedconst isExpandable = await item.isExpandable();// try to expand the item and find if it has childrenconst isParent = await item.hasChildren();// find if item is expandedconst isExpanded = await item.isExpanded();// expand the item if collapsedawait item.expand();// collapse the item if expandedawait item.collapse();// select (click) the itemawait item.select();// get the item's children (expands the item if needed)const children = await item.getChildren();// find a direct child item by label, returns undefined if not foundconst child = await item.findChildItem("name");// get the tooltip if presentconst tooltip = await item.getTooltip();Action Buttons
Section titled “Action Buttons”Tree items may have action buttons that show on hover.
// get all action buttons of the itemconst buttons = await item.getActionButtons();// get an action button by label, returns undefined if not foundconst button = await item.getActionButton("label");