/*!
 * Copyright 2020 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
import { DebugElement, Injector, Type } from '@angular/core';
import { ComponentFixture } from '@angular/core/testing';
import { BaseWidgetObject, FindableWidget } from './widget-object';
import { CorrectReturnTypes, LocatorDriver } from './widget-object';
/**
 * Knows how to find Angular TestElements in the DOM.
 */
export declare class AngularLocatorDriver implements LocatorDriver<TestElement> {
    private testElement;
    private rootElement;
    constructor(testElement: TestElement, rootElement: DebugElement);
    /**
     * @inheritdoc
     */
    get(cssSelector: string): AngularLocatorDriver;
    /**
     * @inheritdoc
     */
    getByText(cssSelector: string, value: string): AngularLocatorDriver;
    /**
     * @inheritdoc
     */
    parents(cssSelector: string): AngularLocatorDriver;
    /**
     * Looks up the chain of debug elements until it finds a parent that matches the CSS selector.
     * Checks the given element.
     */
    private findParent;
    /**
     * @inheritdoc
     */
    unwrap(): TestElement;
    /**
     * @inheritdoc
     */
    findWidget<W extends BaseWidgetObject<TestElement>, C extends FindableWidget<TestElement, W>>(widget: C, cssSelector?: string): CorrectReturnTypes<InstanceType<C>, TestElement>;
}
/**
 * A wrapper around an array of DebugElements that adds convenience methods.
 * Avoid accessing the debug elements at all costs.
 *
 * Can be used in a `for ... of ...` loop to inspect all the sub elements within this TestElement.
 *
 * @example
 * for (const el of testElement) {
 *     expect(el.enabled()).toBeTruthy()
 * }
 */
export declare class TestElement implements Iterable<TestElement> {
    elements: DebugElement[];
    fixture: ComponentFixture<any>;
    constructor(elements: DebugElement[], fixture: ComponentFixture<any>);
    /**
     * Gives the text of the first element.
     */
    text(): string;
    /**
     * Gives the value of the first element.
     */
    value(): string;
    /**
     * Says if this element is enabled.
     */
    enabled(): boolean;
    /**
     * Clicks all of the elements contained.
     */
    click(): void;
    /**
     * Blurs all the contained elements.
     */
    blur(): void;
    /**
     * Clears the input on all the contained elements.
     */
    clear(): void;
    /**
     * Says how many elements are contained in this TestElement.
     */
    length(): number;
    /**
     * Runs change detection with the component fixture.
     */
    detectChanges(): void;
    /**
     * Gives the elements contained within this TestElement where each element is its own TestElement
     */
    toArray(): TestElement[];
    /**
     * Send a keyboard event of type {@param eventType} with properties {@param eventProperties} on this element.
     * Setting the event properties is done with `Object.defineProperty` on the created event. This allows setting
     * properties like `which` that is deprecated and cannot be set with the native approach of creating keyboard event.
     * @param eventType The keyboard event type like 'keyup', 'keydown', 'keypress'
     * @param eventProperties properties of the event like `code`, `key` etc.
     */
    sendKeyboardEvent(eventType: string, eventProperties: {
        [name: string]: unknown;
    }): void;
    /**
     * Returns classes of first element as a string array
     */
    classes(): string[];
    /**
     * Returns style property value of the first element
     * @param key specified CSS property
     */
    getStylePropertyValue(key: string): string;
    /**
     * Returns componentInstance of the first element
     */
    getComponentInstance(): any;
    /**
     * Returns injector of the first element
     */
    getInjector(): Injector;
    /**
     * Finds the first parent element that matches the CSS selector
     */
    private findParents;
    /**
     * Returns the first parent element that matches css selector
     */
    parents(cssSelector: string): TestElement;
    /**
     * Returns componentInstance after query directive
     */
    queryDirective(type: Type<any>): any;
    /**
     * Returns children of the first element that matches css selector
     */
    queryElements(cssSelector: string): TestElement;
    /**
     * Allows a TestElement to be used in a `for ... of ...` loop.
     */
    [Symbol.iterator](): Iterator<TestElement, any, undefined>;
}
