UNPKG

@redhat-developer/page-objects

Version:

Page Object API implementation for a VS Code editor used by ExTester framework.

113 lines (112 loc) 4.32 kB
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License", destination); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { WebElement } from 'selenium-webdriver'; import { AbstractElement } from '../AbstractElement'; import { NotificationsCenter } from '../workbench/NotificationsCenter'; /** * Page object for the status bar at the bottom */ export declare class StatusBar extends AbstractElement { constructor(); /** * Retrieve all status bar items currently displayed * @returns Promise resolving to an array of WebElement */ getItems(): Promise<WebElement[]>; /** * Find status bar item by title/visible label * @param title title of the item * @returns Promise resolving to a WebElement if item is found, to undefined otherwise */ getItem(title: string): Promise<WebElement | undefined>; /** * Open the notifications center * @returns Promise resolving to NotificationsCenter object */ openNotificationsCenter(): Promise<NotificationsCenter>; /** * Close the notifications center * @returns Promise resolving when the notifications center is closed */ closeNotificationsCenter(): Promise<void>; /** * Open the language selection quick pick * Only works with an open editor * @returns Promise resolving when the language selection is opened */ openLanguageSelection(): Promise<void>; /** * Get the current language label text * Only works with an open editor * @returns Promise resolving to string representation of current language */ getCurrentLanguage(): Promise<string>; /** * Open the quick pick for line endings selection * Only works with an open editor * @returns Promise resolving when the line ending selection is opened */ openLineEndingSelection(): Promise<void>; /** * Get the currently selected line ending as text * Only works with an open editor * @returns Promise resolving to string representation of current line ending */ getCurrentLineEnding(): Promise<string>; /** * Open the encoding selection quick pick * Only works with an open editor * @returns Promise resolving when the encoding selection is opened */ openEncodingSelection(): Promise<void>; /** * Get the name of the current encoding as text * Only works with an open editor * @returns Promise resolving to string representation of current encoding */ getCurrentEncoding(): Promise<string>; /** * Open the indentation selection quick pick * Only works with an open editor * @returns Promise resolving when the indentation selection is opened */ openIndentationSelection(): Promise<void>; /** * Get the current indentation option label as text * Only works with an open editor * @returns Promise resolving to string representation of current indentation */ getCurrentIndentation(): Promise<string>; /** * Open the line selection input box * Only works with an open editor * @returns Promise resolving when the line selection is opened */ openLineSelection(): Promise<void>; /** * Get the current editor coordinates as text * Only works with an open editor * @returns Promise resolving to string representation of current position in the editor */ getCurrentPosition(): Promise<string>; /** * Open/Close notification centre * @param open true to open, false to close */ private toggleNotificationsCentre; private getPartText; }