/**
 * 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 { Frame } from './frame';
import { JSHandle } from './jsHandle';
import type { BrowserContext } from './browserContext';
import type { ChannelOwner } from './channelOwner';
import type { FilePayload, Rect, SelectOption, SelectOptionOptions, TimeoutOptions } from './types';
import type * as structs from '../../types/structs';
import type * as api from '../../types/types';
import type { Platform } from '@isomorphic/platform';
import type * as channels from '@protocol/channels';
export declare class ElementHandle<T extends Node = Node> extends JSHandle<T> implements api.ElementHandle {
    private _frame;
    readonly _elementChannel: channels.ElementHandleChannel;
    static from(handle: channels.ElementHandleChannel): ElementHandle;
    static fromNullable(handle: channels.ElementHandleChannel | undefined): ElementHandle | null;
    constructor(parent: ChannelOwner, type: string, guid: string, initializer: channels.JSHandleInitializer);
    asElement(): T extends Node ? ElementHandle<T> : null;
    ownerFrame(): Promise<Frame | null>;
    contentFrame(): Promise<Frame | null>;
    getAttribute(name: string): Promise<string | null>;
    inputValue(): Promise<string>;
    textContent(): Promise<string | null>;
    innerText(): Promise<string>;
    innerHTML(): Promise<string>;
    isChecked(): Promise<boolean>;
    isDisabled(): Promise<boolean>;
    isEditable(): Promise<boolean>;
    isEnabled(): Promise<boolean>;
    isHidden(): Promise<boolean>;
    isVisible(): Promise<boolean>;
    dispatchEvent(type: string, eventInit?: Object): Promise<void>;
    scrollIntoViewIfNeeded(options?: channels.ElementHandleScrollIntoViewIfNeededOptions & TimeoutOptions): Promise<void>;
    hover(options?: channels.ElementHandleHoverOptions & TimeoutOptions): Promise<void>;
    click(options?: channels.ElementHandleClickOptions & TimeoutOptions): Promise<void>;
    dblclick(options?: channels.ElementHandleDblclickOptions & TimeoutOptions): Promise<void>;
    tap(options?: channels.ElementHandleTapOptions & TimeoutOptions): Promise<void>;
    selectOption(values: string | api.ElementHandle | SelectOption | string[] | api.ElementHandle[] | SelectOption[] | null, options?: SelectOptionOptions): Promise<string[]>;
    fill(value: string, options?: channels.ElementHandleFillOptions & TimeoutOptions): Promise<void>;
    selectText(options?: channels.ElementHandleSelectTextOptions & TimeoutOptions): Promise<void>;
    setInputFiles(files: string | FilePayload | string[] | FilePayload[], options?: channels.ElementHandleSetInputFilesOptions & TimeoutOptions): Promise<void>;
    focus(): Promise<void>;
    type(text: string, options?: channels.ElementHandleTypeOptions & TimeoutOptions): Promise<void>;
    press(key: string, options?: channels.ElementHandlePressOptions & TimeoutOptions): Promise<void>;
    check(options?: channels.ElementHandleCheckOptions & TimeoutOptions): Promise<any>;
    uncheck(options?: channels.ElementHandleUncheckOptions & TimeoutOptions): Promise<any>;
    setChecked(checked: boolean, options?: channels.ElementHandleCheckOptions): Promise<void>;
    boundingBox(): Promise<Rect | null>;
    screenshot(options?: Omit<channels.ElementHandleScreenshotOptions, 'mask'> & TimeoutOptions & {
        path?: string;
        mask?: api.Locator[];
    }): Promise<Buffer>;
    $(selector: string): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
    $$(selector: string): Promise<ElementHandle<SVGElement | HTMLElement>[]>;
    $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>;
    waitForElementState(state: 'visible' | 'hidden' | 'stable' | 'enabled' | 'disabled', options?: TimeoutOptions): Promise<void>;
    waitForSelector(selector: string, options: channels.ElementHandleWaitForSelectorOptions & TimeoutOptions & {
        state: 'attached' | 'visible';
    }): Promise<ElementHandle<SVGElement | HTMLElement>>;
    waitForSelector(selector: string, options?: channels.ElementHandleWaitForSelectorOptions & TimeoutOptions): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
}
export declare function convertSelectOptionValues(values: string | api.ElementHandle | SelectOption | string[] | api.ElementHandle[] | SelectOption[] | null): {
    elements?: channels.ElementHandleChannel[];
    options?: SelectOption[];
};
type SetInputFilesFiles = Pick<channels.ElementHandleSetInputFilesParams, 'payloads' | 'localPaths' | 'localDirectory' | 'streams' | 'directoryStream'>;
export declare function convertInputFiles(platform: Platform, files: string | FilePayload | string[] | FilePayload[], context: BrowserContext): Promise<SetInputFilesFiles>;
export declare function determineScreenshotType(options: {
    path?: string;
    type?: 'png' | 'jpeg';
}): 'png' | 'jpeg' | undefined;
export {};
//# sourceMappingURL=elementHandle.d.ts.map