import type { ChainablePromiseElement } from 'webdriverio'; import { ActivityBar, DebugView, SideBarView, ScmView } from '../../index.js'; import { NewScmView } from '../sidebar/scm/NewScmView.js'; import { IPageDecorator, ElementWithContextMenu, VSCodeLocatorMap } from '../utils.js'; import { ViewControl as ViewControlLocators } from '../../locators/1.73.0.js'; export interface ViewControl extends IPageDecorator { } /** * Page object representing a view container item in the activity bar * * ```ts * const workbench = await browser.getWorkbench() * const viewControls = await workbench.getActivityBar().getViewControls() * console.log(await Promise.all(viewControls.map((vc) => vc.getTitle()))) * // returns: [ * // 'Explorer', * // 'Search', * // 'Source Control', * // 'Run and Debug', * // 'Extensions' * // ] * ``` * * @category ActivityBar */ export declare class ViewControl extends ElementWithContextMenu { bar: ActivityBar; /** * @private */ locatorKey: "ViewControl"; constructor(locators: VSCodeLocatorMap, element: ChainablePromiseElement, bar: ActivityBar); /** * Opens the associated view if not already open * @returns Promise resolving to SideBarView object representing the opened view */ openView(): Promise | NewScmView | ScmView | DebugView>; /** * Closes the associated view if not already closed * @returns Promise resolving when the view closes */ closeView(): Promise; /** * Returns the title of the associated view * @param includeKeyboardShortcuts if true it includes the keyboard shortcut * in the title (e.g. "Source Control (Ctrl+Shift+G)") */ getTitle(includeKeyboardShortcuts?: boolean): Promise; } //# sourceMappingURL=ViewControl.d.ts.map