ContextMenuItem

Lookup
Section titled “Lookup”One can retrieve an item from an open context menu, much like follows:
import { ActivityBar } from 'vscode-extension-tester';...const menu = await new ActivityBar().openContextMenu();const item = await menu.getItem('References');Select/Click
Section titled “Select/Click”// if item has no childrenawait item.select();// if there is a submenu under the itemconst submenu = await item.select();Get Parent Menu
Section titled “Get Parent Menu”const parentMenu = item.getParent();Get Label
Section titled “Get Label”const label = await item.getLabel();