import { ElementWithContexMenu } from "../ElementWithContextMenu"; import { AbstractElement } from "../AbstractElement"; import { WebElement, By } from "selenium-webdriver"; /** * Arbitrary item in the side bar view */ export declare abstract class ViewItem extends ElementWithContexMenu { /** * Select the item in the view. * Note that selecting the item will toggle its expand state when applicable. * @returns Promise resolving when the item has been clicked */ select(): Promise; } /** * Abstract representation of a row in the tree inside a view content section */ export declare abstract class TreeItem extends ViewItem { /** * Retrieves the label of this view item */ abstract getLabel(): Promise; /** * Retrieves the tooltip of this TreeItem. * @returns A promise resolving to the tooltip or undefined if the TreeItem has no tooltip. */ getTooltip(): Promise; /** * Retrieves the description of this TreeItem. * @returns A promise resolving to the tooltip or undefined if the TreeItem has no description. */ getDescription(): Promise; /** * Finds if the item has children by actually counting the child items * Note that this will expand the item if it was collapsed * @returns Promise resolving to true/false */ hasChildren(): Promise; /** * Finds whether the item is expanded. Always returns false if item has no children. * @returns Promise resolving to true/false */ abstract isExpanded(): Promise; /** * Find children of an item, will try to expand the item in the process * @returns Promise resolving to array of TreeItem objects, empty array if item has no children */ abstract getChildren(): Promise; /** * Finds if the item is expandable/collapsible * @returns Promise resolving to true/false */ abstract isExpandable(): Promise; /** * Expands the current item, if it can be expanded and is collapsed. */ expand(): Promise; /** * Find a child item with the given name * @returns Promise resolving to TreeItem object if the child item exists, undefined otherwise */ findChildItem(name: string): Promise; /** * Collapse the item if expanded */ collapse(): Promise; /** * Find all action buttons bound to the view item * * @returns array of ViewItemAction objects, empty array if item has no * actions associated */ getActionButtons(): Promise; /** * Find action button for view item by label * @param label label of the button to search by * * @returns ViewItemAction object if such button exists, undefined otherwise */ getActionButton(label: string): Promise; /** * Find all child elements of a tree item * @param locator locator of a given type of tree item */ protected getChildItems(locator: By): Promise; protected findTwistie(): Promise; } /** * Action button bound to a view item */ export declare class ViewItemAction extends AbstractElement { constructor(actionConstructor: By, viewItem: TreeItem); /** * Get label of the action button */ getLabel(): Promise; }