CustomTreeSection

The ‘custom’ tree section, usually contributed by extensions as TreeView. All The behavior is defined by the general ViewSection class.
Lookup
Section titled “Lookup”import { SideBarView, CustomTreeSection } from 'vscode-extension-tester';...// Type is inferred automatically, the type cast here is used to be more explicitconst section = await new SideBarView().getContent().getSection('servers') as CustomTreeSection;Find Items
Section titled “Find Items”In addition to a label string, findItem also accepts a predicate function.
// find an item by labelconst item = await section.findItem('itemLabel');// find an item using a predicate functionconst item1 = await section.findItem(async (el) => (await el.getLabel()).startsWith('item'));Get Welcome Content
Section titled “Get Welcome Content”Some sections may provide a welcome content when their tree is empty.
// find welcome content, return undefined if not presentconst welcome = await section.findWelcomeContent();
// get all the possible buttons and paragraphs in a listconst contents = await welcome.getContents();
// get all buttonsconst btns = await welcome.getButtons();
// get specific buttonconst btn = await welcome.getButton("title");
// get paragraphs as strings in a listconst text = await welcome.getTextSections();