Skip to content

ActivityBar

github-actions[bot] edited this page May 16, 2024 · 4 revisions

activityBar

Look up the Activity Bar

Import and find the activity bar

import { ActivityBar } from 'vscode-extension-tester';
...
const activityBar = new ActivityBar();

Get view controls

Get handles for all view controls/buttons that operate the view containers

const controls = await activityBar.getViewControls();

Get view control by title

Find a view control/button in the activity bar by its title

// get Explorer view control
const controls = await activityBar.getViewControl("Explorer");

Get global actions

Get handles for all global actions buttons on the bottom of the action bar

const actions = await activityBar.getGlobalActions();

Get global action by title

Find global actions button by title

const actions = await activityBar.getGlobalAction("Manage");

Open context menu

Left click on the activity bar to open the context menu

const menu = await activityBar.openContextMenu();