/*!
 * Copyright 2020 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
import { FindableWidget, FindParams } from './widget-object';
/**
 * Represents an object that knows how to drive testing for a specific testing type.
 */
export interface WidgetDriver {
    /**
     * Finds a widget using the given params within this widget driver.
     */
    find<W extends WidgetDriver>(params: FindParams<FindableWidget<W>> | FindableWidget<W>): W;
    /**
     * Says if any child elements exists that use this css selector.
     */
    exists(cssSelector?: string): Promise<boolean>;
    /**
     * Says if the element is disabled.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    disabled(cssSelector?: string): Promise<boolean>;
    /**
     * Says if the element is hidden.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    hidden(cssSeletor?: string): Promise<boolean>;
    /**
     * Says if the element is visible.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    visible(cssSelector?: string): Promise<boolean>;
    /**
     * Gives the CSS classes applied to the element
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    classes(cssSelector?: string): Promise<string[]>;
    /**
     * Clicks the element.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    click(cssSelector?: string): Promise<void>;
    /**
     * Checks the checkbox contained in the element.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    check(cssSelector?: string): Promise<void>;
    /**
     * Says if the checkbox is checked within the element.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    getChecked(cssSelector?: string): Promise<boolean>;
    /**
     * Selects the given option within the element.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    select(option: string, cssSelector?: string): Promise<void>;
    /**
     * Sends a single key event to the element.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    sendKeyboardKey(key: string, cssSelector?: string): Promise<void>;
    /**
     * Sets the input value of the element to the given value.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     * @param shouldAppend if the value should be appended to the current input value or if the input should be cleared.
     *                     defaults to clearing the input (false).
     */
    setInputValue(value: string, shouldAppend?: boolean, cssSelector?: string): Promise<void>;
    /**
     * Gives the value of the input.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    getInputValue(cssSelector?: string): Promise<string | number | string[]>;
    /**
     * Gives the value of all inputs that match the given css selector.
     *
     * @param parentCssSelector the CSS selector of the immediate parent of the children.
     * @param cssSelector the CSS selector to filter the children by.
     */
    getInputValues(parentCssSelector?: string, cssSelector?: string): Promise<(string | number | string[])[]>;
    /**
     * Clears the input value of the element.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    clearInputValue(cssSelector?: string): Promise<void>;
    /**
     * Gives the text within the element.
     *
     * @param cssSelector the selector to use to find the element, if null uses the current WidgetDriver.
     */
    getText(cssSelector?: string): Promise<string>;
    /**
     * Gives the text of all elements that match the given CSS selectors.
     *
     * @param parentCssSelector the CSS selector of the immediate parent of the children.
     * @param cssSelector the CSS selector to filter the children by.
     */
    getTexts(parentCssSelector?: string, cssSelector?: string): Promise<string[]>;
}
/**
 * An object that all other WidgetObjects should extend.
 */
export declare class BaseWidgetObject implements WidgetDriver {
    private driver;
    constructor(driver: WidgetDriver);
    find<W extends WidgetDriver>(params: FindParams<FindableWidget<W>> | FindableWidget<W>): W;
    exists(cssSelector?: string): Promise<boolean>;
    disabled(cssSelector?: string): Promise<boolean>;
    visible(cssSelector?: string): Promise<boolean>;
    hidden(cssSelector?: string): Promise<boolean>;
    click(cssSelector?: string): Promise<void>;
    classes(cssSelector?: string): Promise<string[]>;
    check(cssSelector?: string): Promise<void>;
    getChecked(cssSelector?: string): Promise<boolean>;
    select(option: string, cssSelector?: string): Promise<void>;
    sendKeyboardKey(key: string, cssSelector?: string): Promise<void>;
    setInputValue(value: string, shouldAppend?: boolean, cssSelector?: string): Promise<void>;
    clearInputValue(cssSelector?: string): Promise<void>;
    getText(cssSelector?: string): Promise<string>;
    getTexts(parentCssSelector?: string, cssSelector?: string): Promise<string[]>;
    getInputValue(cssSelector?: string): Promise<string | number | string[]>;
    getInputValues(parentCssSelector?: string, cssSelector?: string): Promise<(string | number | string[])[]>;
}
