/**
 * Copyright 2017 Google Inc. All rights reserved.
 * Modifications copyright (c) Microsoft Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://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 { EventEmitter } from './eventEmitter';
import { ChannelOwner } from './channelOwner';
import { ElementHandle } from './elementHandle';
import { FrameLocator, Locator } from './locator';
import * as network from './network';
import type { LocatorOptions } from './locator';
import type { Page } from './page';
import type { DropPayload, FilePayload, LifecycleEvent, SelectOption, SelectOptionOptions, StrictOptions, TimeoutOptions, WaitForFunctionOptions } from './types';
import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import type { ByRoleOptions } from '@isomorphic/locatorUtils';
import type { URLMatch } from '@isomorphic/urlMatch';
import type * as channels from '@protocol/channels';
export type WaitForNavigationOptions = {
    timeout?: number;
    waitUntil?: LifecycleEvent;
    url?: URLMatch;
};
export declare class Frame extends ChannelOwner<channels.FrameChannel> implements api.Frame {
    _eventEmitter: EventEmitter;
    _loadStates: Set<LifecycleEvent>;
    _parentFrame: Frame | null;
    _url: string;
    _name: string;
    _detached: boolean;
    _childFrames: Set<Frame>;
    _page: Page | undefined;
    static from(frame: channels.FrameChannel): Frame;
    static fromNullable(frame: channels.FrameChannel | undefined): Frame | null;
    constructor(parent: ChannelOwner, type: string, guid: string, initializer: channels.FrameInitializer);
    page(): Page;
    _timeout(options?: TimeoutOptions): number;
    _navigationTimeout(options?: TimeoutOptions): number;
    goto(url: string, options?: channels.FrameGotoOptions & TimeoutOptions): Promise<network.Response | null>;
    private _setupNavigationWaiter;
    waitForNavigation(options?: WaitForNavigationOptions): Promise<network.Response | null>;
    waitForLoadState(state?: LifecycleEvent, options?: {
        timeout?: number;
    }): Promise<void>;
    waitForURL(url: URLMatch, options?: {
        waitUntil?: LifecycleEvent;
        timeout?: number;
    }): Promise<void>;
    frameElement(): Promise<ElementHandle>;
    evaluateHandle<R, Arg>(pageFunction: structs.PageFunction<Arg, R>, arg?: Arg): Promise<structs.SmartHandle<R>>;
    evaluate<R, Arg>(pageFunction: structs.PageFunction<Arg, R>, arg?: Arg): Promise<R>;
    _evaluateExposeUtilityScript<R, Arg>(pageFunction: structs.PageFunction<Arg, R>, arg?: Arg): Promise<R>;
    $(selector: string, options?: {
        strict?: boolean;
    }): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
    waitForSelector(selector: string, options: channels.FrameWaitForSelectorOptions & TimeoutOptions & {
        state: 'attached' | 'visible';
    }): Promise<ElementHandle<SVGElement | HTMLElement>>;
    waitForSelector(selector: string, options?: channels.FrameWaitForSelectorOptions & TimeoutOptions): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
    dispatchEvent(selector: string, type: string, eventInit?: any, options?: channels.FrameDispatchEventOptions & TimeoutOptions): Promise<void>;
    $eval<R, Arg>(selector: string, pageFunction: structs.PageFunctionOn<Element, Arg, R>, arg?: Arg): Promise<R>;
    $$eval<R, Arg>(selector: string, pageFunction: structs.PageFunctionOn<Element[], Arg, R>, arg?: Arg): Promise<R>;
    $$(selector: string): Promise<ElementHandle<SVGElement | HTMLElement>[]>;
    _queryCount(selector: string, options?: {}): Promise<number>;
    content(): Promise<string>;
    setContent(html: string, options?: channels.FrameSetContentOptions & TimeoutOptions): Promise<void>;
    name(): string;
    url(): string;
    parentFrame(): Frame | null;
    childFrames(): Frame[];
    isDetached(): boolean;
    addScriptTag(options?: {
        url?: string;
        path?: string;
        content?: string;
        type?: string;
    }): Promise<ElementHandle>;
    addStyleTag(options?: {
        url?: string;
        path?: string;
        content?: string;
    }): Promise<ElementHandle>;
    click(selector: string, options?: channels.FrameClickOptions & TimeoutOptions): Promise<any>;
    dblclick(selector: string, options?: channels.FrameDblclickOptions & TimeoutOptions): Promise<any>;
    dragAndDrop(source: string, target: string, options?: channels.FrameDragAndDropOptions & TimeoutOptions): Promise<any>;
    _drop(selector: string, payload: DropPayload, options?: Omit<channels.FrameDropOptions, 'payloads' | 'localPaths' | 'streams' | 'data'> & TimeoutOptions): Promise<void>;
    tap(selector: string, options?: channels.FrameTapOptions & TimeoutOptions): Promise<any>;
    fill(selector: string, value: string, options?: channels.FrameFillOptions & TimeoutOptions): Promise<any>;
    _highlight(selector: string, style?: string): Promise<any>;
    _hideHighlight(selector: string): Promise<any>;
    locator(selector: string, options?: LocatorOptions): Locator;
    getByTestId(testId: string | RegExp): Locator;
    getByAltText(text: string | RegExp, options?: {
        exact?: boolean;
    }): Locator;
    getByLabel(text: string | RegExp, options?: {
        exact?: boolean;
    }): Locator;
    getByPlaceholder(text: string | RegExp, options?: {
        exact?: boolean;
    }): Locator;
    getByText(text: string | RegExp, options?: {
        exact?: boolean;
    }): Locator;
    getByTitle(text: string | RegExp, options?: {
        exact?: boolean;
    }): Locator;
    getByRole(role: string, options?: ByRoleOptions): Locator;
    frameLocator(selector: string): FrameLocator;
    focus(selector: string, options?: channels.FrameFocusOptions & TimeoutOptions): Promise<void>;
    textContent(selector: string, options?: channels.FrameTextContentOptions & TimeoutOptions): Promise<null | string>;
    innerText(selector: string, options?: channels.FrameInnerTextOptions & TimeoutOptions): Promise<string>;
    innerHTML(selector: string, options?: channels.FrameInnerHTMLOptions & TimeoutOptions): Promise<string>;
    getAttribute(selector: string, name: string, options?: channels.FrameGetAttributeOptions & TimeoutOptions): Promise<string | null>;
    inputValue(selector: string, options?: channels.FrameInputValueOptions & TimeoutOptions): Promise<string>;
    isChecked(selector: string, options?: channels.FrameIsCheckedOptions & TimeoutOptions): Promise<boolean>;
    isDisabled(selector: string, options?: channels.FrameIsDisabledOptions & TimeoutOptions): Promise<boolean>;
    isEditable(selector: string, options?: channels.FrameIsEditableOptions & TimeoutOptions): Promise<boolean>;
    isEnabled(selector: string, options?: channels.FrameIsEnabledOptions & TimeoutOptions): Promise<boolean>;
    isHidden(selector: string, options?: channels.FrameIsHiddenOptions & TimeoutOptions): Promise<boolean>;
    isVisible(selector: string, options?: channels.FrameIsVisibleOptions & TimeoutOptions): Promise<boolean>;
    hover(selector: string, options?: channels.FrameHoverOptions & TimeoutOptions): Promise<void>;
    selectOption(selector: string, values: string | api.ElementHandle | SelectOption | string[] | api.ElementHandle[] | SelectOption[] | null, options?: SelectOptionOptions & StrictOptions): Promise<string[]>;
    setInputFiles(selector: string, files: string | FilePayload | string[] | FilePayload[], options?: channels.FrameSetInputFilesOptions & TimeoutOptions): Promise<void>;
    type(selector: string, text: string, options?: channels.FrameTypeOptions & TimeoutOptions): Promise<void>;
    press(selector: string, key: string, options?: channels.FramePressOptions & TimeoutOptions): Promise<void>;
    check(selector: string, options?: channels.FrameCheckOptions & TimeoutOptions): Promise<void>;
    uncheck(selector: string, options?: channels.FrameUncheckOptions & TimeoutOptions): Promise<void>;
    setChecked(selector: string, checked: boolean, options?: channels.FrameCheckOptions): Promise<void>;
    waitForTimeout(timeout: number): Promise<void>;
    waitForFunction<R, Arg>(pageFunction: structs.PageFunction<Arg, R>, arg?: Arg, options?: WaitForFunctionOptions): Promise<structs.SmartHandle<R>>;
    title(): Promise<string>;
    _expect(expression: string, options: Omit<channels.FrameExpectParams, 'expression'>): Promise<ExpectResult>;
}
export type ExpectReceived = {
    value?: any;
    ariaSnapshot?: string;
};
export type ExpectResult = {
    matches: boolean;
    received?: ExpectReceived;
    log?: string[];
    timedOut?: boolean;
    errorMessage?: string;
};
export declare function verifyLoadState(name: string, waitUntil: LifecycleEvent): LifecycleEvent;
//# sourceMappingURL=frame.d.ts.map