import { IPageDecorator, BasePage, VSCodeLocatorMap } from '../utils.js'; import { Input as InputLocators, InputBox as InputBoxLocators, QuickOpenBox as QuickOpenBoxLocators } from '../../locators/1.73.0.js'; type AllInputLocators = typeof InputLocators & typeof InputBoxLocators & typeof QuickOpenBoxLocators; export interface Input extends IPageDecorator { } /** * Abstract page object for input fields * * @category Workbench */ export declare abstract class Input extends BasePage { /** * Get current text of the input field * @returns Promise resolving to text of the input field */ getText(): Promise; /** * Set (by selecting all and typing) text in the input field * @param text text to set into the input field * @returns Promise resolving when the text is typed in */ setText(text: string): Promise; /** * Get the placeholder text for the input field * @returns Promise resolving to input placeholder */ getPlaceHolder(): Promise; /** * Confirm the input field by pressing Enter * @returns Promise resolving when the input is confirmed */ confirm(): Promise; /** * Cancel the input field by pressing Escape * @returns Promise resolving when the input is cancelled */ cancel(): Promise; /** * Clear the input field * @returns Promise resolving when the field is cleared */ clear(): Promise; /** * Select (click) a quick pick option. Will scroll through the quick picks to find the item. * Search for the item can be done by its text, or index in the quick pick menu. * Note that scrolling does not affect the item's index, but it will * replace some items in the DOM (thus they become unreachable) * * @param indexOrText index (number) or text (string) of the item to search by * @returns Promise resolving when the given quick pick is selected */ selectQuickPick(indexOrText: string | number): Promise; /** * Select/Deselect all quick picks using the 'select all' checkbox * If multiple selection is disabled on the input box, no action is performed * * @param state true to select all, false to deselect all * @returns Promise resolving when all quick picks have been toggled to desired state */ toggleAllQuickPicks(state: boolean): Promise; /** * Scroll through the quick picks to find an item by the name or index * @param indexOrText index (number) or text (string) of the item to search by * @returns Promise resolvnig to QuickPickItem if found, to undefined otherwise */ findQuickPick(indexOrText: string | number): Promise; /** * Retrieve the title of an input box if it has one * @returns Promise resolving to title if it exists, to undefined otherwise */ getTitle(): Promise; /** * Click on the back button if it exists * @returns Promise resolving to true if a button was clicked, to false otherwise */ back(): Promise; /** * Find whether the input box has an active progress bar * @returns Promise resolving to true/false */ abstract hasProgress(): Promise; /** * Retrieve the quick pick items currently available in the DOM * (visible in the quick pick menu) * @returns Promise resolving to array of QuickPickItem objects */ abstract getQuickPicks(): Promise; private resetPosition; } export interface QuickPickItem extends IPageDecorator { } /** * Page object representing a quick pick option in the input box * * @category Workbench */ export declare class QuickPickItem extends BasePage { /** * @private */ locatorKey: "Input"; private index; input: Input; constructor(locators: VSCodeLocatorMap, index: number, inputField: Input); /** * Get the label of the quick pick item */ getLabel(): Promise; /** * Get the description of the quick pick item */ getDescription(): Promise; /** * Get the index of the quick pick item */ getIndex(): number; /** * Select (click) the quick pick item * @returns Promise resolving when the item has been clicked */ select(): Promise; } export interface InputBox extends IPageDecorator { } /** * Plain input box variation of the input page object * * @category Workbench */ export declare class InputBox extends Input { /** * @private */ locatorKey: ("Input" | "InputBox")[]; /** * Get the message below the input field */ getMessage(): Promise; hasProgress(): Promise; getQuickPicks(): Promise; /** * Find whether the input is showing an error * @returns Promise resolving to notification message */ hasError(): Promise; /** * Check if the input field is masked (input type password) * @returns Promise resolving to notification message */ isPassword(): Promise; } export interface QuickOpenBox extends IPageDecorator { } /** * @deprecated as of VS Code 1.44.0, quick open box has been replaced with input box * The quick open box variation of the input * * @category Workbench */ export declare class QuickOpenBox extends Input { /** * @private */ locatorKey: ("QuickOpenBox" | "Input")[]; hasProgress(): Promise; getQuickPicks(): Promise; } export {}; //# sourceMappingURL=Input.d.ts.map