import { Page as PuppeteerPage } from 'puppeteer';
import { Page as PlaywrightPage } from 'playwright';
import { TestContext } from './TestContext';
import { TestEndStatus } from './attachInterfaces';
import { InstrumentedFunctionResult } from '@testim/root-cause-types';
export declare type RootCausePage = PuppeteerPage | PlaywrightPage;
export interface AttachOptions {
    noResultsServer?: boolean;
    externalTestName?: string;
    resultsDirectory?: string;
}
export interface CommonEachHookArgs {
    testContext: TestContext;
    fnName: string;
    proxyContext: any;
    rootPage: RootCausePage;
    args: any[];
    methodCallData: ProxiedMethodCallData[];
}
export declare type BeforeHookArgs = CommonEachHookArgs;
export declare type BeforeHook = (args: BeforeHookArgs) => Promise<void>;
export interface AfterHookArgs extends CommonEachHookArgs {
    instrumentedFunctionResult: InstrumentedFunctionResult<any, any>;
}
export declare type AfterHook = (args: AfterHookArgs) => Promise<void>;
export interface BeforeAllHookArgs {
    testContext: TestContext;
    proxyContext: any;
    rootPage: RootCausePage;
}
export declare type BeforeAllHook = (args: BeforeAllHookArgs) => Promise<void>;
export interface AfterAllHookArgs {
    testContext: TestContext;
    endStatus: TestEndStatus<unknown, unknown>;
}
export declare type AfterAllHook = (args: AfterAllHookArgs) => Promise<void>;
export interface IAutomationFrameworkInstrumentor {
    registerBeforeAllHook(hook: BeforeAllHook): void;
    registerAfterAllHook(hook: AfterAllHook): void;
    registerBeforeHook(hook: BeforeHook): void;
    registerAfterHook(hook: AfterHook): void;
    wrapWithProxy<T extends object>(proxiedObject: T): T;
    end(endStatus: TestEndStatus<unknown, unknown>): Promise<void>;
    pause(): void;
    resume(): void;
}
export interface ProxiedMethodCallData {
    creationFunction: string;
    selector?: string;
    text?: string;
    index?: number;
}
