@redhat-developer/page-objects
Version:
Page Object API implementation for a VS Code editor used by ExTester framework.
65 lines (64 loc) • 2.5 kB
TypeScript
/**
* 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 { ViewItem } from '../ViewItem';
import { WebElement } from 'selenium-webdriver';
import { ContextMenu } from '../../menu/ContextMenu';
import { ExtensionsViewSection } from './ExtensionsViewSection';
/**
* Page object representing an extension in the extensions view
*/
export declare class ExtensionsViewItem extends ViewItem {
constructor(extensionElement: WebElement, section: ExtensionsViewSection);
/**
* Get title of the extension
*/
getTitle(): Promise<string>;
/**
* Get version of the extension
* @returns Promise resolving to version string
*/
getVersion(): Promise<string>;
/**
* Get the author of the extension
* @returns Promise resolving to displayed author
*/
getAuthor(): Promise<string>;
/**
* Get the description of the extension
* @returns Promise resolving to description
*/
getDescription(): Promise<string>;
/**
* Find if the extension is installed
* @returns Promise resolving to true/false
*/
isInstalled(): Promise<boolean>;
/**
* Open the management context menu if the extension is installed
* @returns Promise resolving to ContextMenu object
*/
manage(): Promise<ContextMenu>;
/**
* Install the extension if not installed already.
*
* Will wait for the extension to finish installing. To skip the wait, set timeout to 0.
*
* @param timeout timeout to wait for the installation in milliseconds, default unlimited, set to 0 to skip waiting
* @returns Promise resolving when the installation finishes or is skipped
*/
install(timeout?: number): Promise<void>;
}