Page object representing the custom VSCode title bar

Hierarchy (view full)

Properties

elem$: ChainablePromiseElement<Element>
elem$$: ChainablePromiseArray<Element[]>
itemElement$: ChainablePromiseElement<Element>
itemElement$$: ChainablePromiseArray<Element[]>
itemLabel$: ChainablePromiseElement<Element>
itemLabel$$: ChainablePromiseArray<Element[]>
itemNesting$: ChainablePromiseElement<Element>
itemNesting$$: ChainablePromiseArray<Element[]>
menubar$: ChainablePromiseElement<Element>
menubar$$: ChainablePromiseArray<Element[]>
overflowItemConstructor$: ((...args) => ChainablePromiseElement<Element>)

Type declaration

    • (...args): ChainablePromiseElement<Element>
    • Parameters

      • Rest ...args: [label: string]

      Returns ChainablePromiseElement<Element>

overflowItemConstructor$$: ((...args) => ChainablePromiseArray<Element[]>)

Type declaration

    • (...args): ChainablePromiseArray<Element[]>
    • Parameters

      • Rest ...args: [label: string]

      Returns ChainablePromiseArray<Element[]>

title$: ChainablePromiseElement<Element>
title$$: ChainablePromiseArray<Element[]>
topLevelItemConstructor$: ((...args) => ChainablePromiseElement<Element>)

Type declaration

    • (...args): ChainablePromiseElement<Element>
    • Parameters

      • Rest ...args: [label: string]

      Returns ChainablePromiseElement<Element>

topLevelItemConstructor$$: ((...args) => ChainablePromiseArray<Element[]>)

Type declaration

    • (...args): ChainablePromiseArray<Element[]>
    • Parameters

      • Rest ...args: [label: string]

      Returns ChainablePromiseArray<Element[]>

Accessors

  • get elem(): ChainablePromiseElement<Element>
  • Base element of given page object

    Returns ChainablePromiseElement<Element>

  • get parent(): ChainablePromiseElement<Element>
  • Parent element of given page object

    Returns ChainablePromiseElement<Element>

Methods

  • Find whether the menu has an item of a given name

    Parameters

    • name: string

      name of the item to search for

    Returns Promise<boolean>

    true if menu has an item with the given name, false otherwise

  • Poll for the element to become visible

    Parameters

    • timeout: number = 10000

      custom timeout for the wait

    • interval: number = 2000

      custom interval to control polling

    Returns Promise<TitleBar>

    thenable self reference

  • Recursively select an item with a given path.

    E.g. calling select('File', 'Preferences', 'Settings') will open the 'File' -> 'Preferences' submenus and then click on 'Settings'.

    Selection happens in order of the arguments, if one of the items in the middle of the path has no children, the consequent path arguments will be ignored.

    Parameters

    • Rest ...path: string[]

      path to the item to select, represented by a sequence of strings

    Returns Promise<undefined | Menu<{
        elem: string;
        itemElement: string;
        itemLabel: string;
        itemNesting: string;
        menubar: string;
        overflowItemConstructor: ((label) => string);
        title: string;
        topLevelItemConstructor: ((label) => string);
    }>>

    void if the last clicked item is a leaf, Menu item representing its submenu otherwise

  • Wait for the element to become visible

    Parameters

    • timeout: number = 5000

      custom timeout for the wait

    Returns Promise<TitleBar>

    thenable self reference

Generated using TypeDoc