Skip to content

NotificationsCenter

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

center

Lookup

To open the notifications center, use either Workbench or StatusBar object:

import { Workbench, StatusBar, NotificationType } from 'vscode-extension-tester';
...
center = await new Workbench().openNotificationsCenter();
center1 = await new StatusBar().openNotificationsCenter();

Get the Notifications

// get all notifications
const notifications = await center.getNotifications(NotificationType.Any);
// get info notifications
const infos = await center.getNotifications(NotificationType.Info);

Clear and Close

// clear all notifications
await center.clearAllNotifications();
// close the notifications center
await center.close();
Clone this wiki locally