import type { ChainablePromiseElement } from 'webdriverio'; import { TextEditor, DiffEditor, SettingsEditor } from '../index.js'; import { IPageDecorator, BasePage, ElementWithContextMenu, VSCodeLocatorMap } from '../utils.js'; import { EditorView as EditorViewLocators, Editor as EditorLocatorsObj } from '../../locators/1.73.0.js'; export interface EditorView extends IPageDecorator { } /** * View handling the open editors * * @category Editor */ export declare class EditorView extends BasePage { /** * @private */ locatorKey: "EditorView"; /** * Switch to an editor tab with the given title * @param title title of the tab * @param groupIndex zero based index for the editor group (0 for the left most group) * @returns Promise resolving to Editor object */ openEditor(title: string, groupIndex?: number): Promise; /** * Close an editor tab with the given title * @param title title of the tab * @param groupIndex zero based index for the editor group (0 for the left most group) * @returns Promise resolving when the tab's close button is pressed */ closeEditor(title: string, groupIndex?: number): Promise; /** * Close all open editor tabs * @param groupIndex optional index to specify an editor group * @returns Promise resolving once all tabs have had their close button pressed */ closeAllEditors(groupIndex?: number): Promise; /** * Retrieve all open editor tab titles in an array * @param groupIndex optional index to specify an editor group, if left empty will search all groups * @returns Promise resolving to array of editor titles */ getOpenEditorTitles(groupIndex?: number): Promise; /** * Retrieve an editor tab from a given group by title * @param title title of the tab * @param groupIndex zero based index of the editor group, default 0 (leftmost one) * @returns promise resolving to EditorTab object */ getTabByTitle(title: string, groupIndex?: number): Promise; /** * Retrieve all open editor tabs * @param groupIndex index of group to search for tabs, if left undefined, all groups are searched * @returns promise resolving to EditorTab list */ getOpenTabs(groupIndex?: number): Promise; /** * Retrieve the active editor tab * @returns promise resolving to EditorTab object, undefined if no tab is active */ getActiveTab(): Promise; /** * Retrieve all editor groups in a list, sorted left to right * @returns promise resolving to an array of EditorGroup objects */ getEditorGroups(): Promise; /** * Retrieve an editor group with a given index (counting from left to right) * @param index zero based index of the editor group (leftmost group has index 0) * @returns promise resolving to an EditorGroup object */ getEditorGroup(index: number): Promise; /** * Get editor actions of a select editor group * @param groupIndex zero based index of the editor group (leftmost group has index 0), default 0 * @returns promise resolving to list of WebElement objects */ getActions(groupIndex?: number): Promise; /** * Get editor action of a select editor group, search by title * @param groupIndex zero based index of the editor group (leftmost group has index 0), default 0 * @returns promise resolving to WebElement object if found, undefined otherwise */ getAction(title: string, groupIndex?: number): Promise; } export interface EditorGroup extends IPageDecorator { } /** * Page object representing an editor group * * @category Editor */ export declare class EditorGroup extends BasePage { view: EditorView; /** * @private */ locatorKey: "EditorView"; constructor(locators: VSCodeLocatorMap, element: ChainablePromiseElement, view?: EditorView); /** * Switch to an editor tab with the given title * @param title title of the tab * @returns Promise resolving to Editor object */ openEditor(title: string): Promise; /** * Close an editor tab with the given title * @param title title of the tab * @returns Promise resolving when the tab's close button is pressed */ closeEditor(title: string): Promise; /** * Close all open editor tabs * @returns Promise resolving once all tabs have had their close button pressed */ closeAllEditors(): Promise; /** * Retrieve all open editor tab titles in an array * @returns Promise resolving to array of editor titles */ getOpenEditorTitles(): Promise; /** * Retrieve an editor tab by title * @param title title of the tab * @returns promise resolving to EditorTab object */ getTabByTitle(title: string): Promise; /** * Retrieve all open editor tabs * @returns promise resolving to EditorTab list */ getOpenTabs(): Promise; /** * Retrieve the active editor tab * @returns promise resolving to EditorTab object, undefined if no tab is active */ getActiveTab(): Promise; /** * Retrieve the editor action buttons as WebElements * @returns promise resolving to list of WebElement objects */ getActions(): Promise; /** * Find an editor action button by title * @param title title of the button * @returns promise resolving to WebElement representing the button if found, undefined otherwise */ getAction(title: string): Promise; } export interface EditorTab extends IPageDecorator { } /** * Page object for editor view tab * * @category Editor */ export declare class EditorTab extends ElementWithContextMenu { view: EditorView; /** * @private */ locatorKey: "Editor"; constructor(locators: VSCodeLocatorMap, element: ChainablePromiseElement, view: EditorView); /** * Get the tab title as string */ getTitle(): Promise; /** * Select (click) the tab */ select(): Promise; } //# sourceMappingURL=EditorView.d.ts.map