@auto-browse/auto-browse
Version:
AI-powered browser automation
40 lines (39 loc) • 1.48 kB
TypeScript
/**
* 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 * as playwright from 'playwright';
import { PageSnapshot } from './pageSnapshot.js';
import type { Context } from './context.js';
export declare class Tab {
readonly context: Context;
readonly page: playwright.Page;
private _consoleMessages;
private _requests;
private _snapshot;
private _onPageClose;
constructor(context: Context, page: playwright.Page, onPageClose: (tab: Tab) => void);
private _clearCollectedArtifacts;
private _onClose;
title(): Promise<string>;
waitForLoadState(state: 'load', options?: {
timeout?: number;
}): Promise<void>;
navigate(url: string): Promise<void>;
hasSnapshot(): boolean;
snapshotOrDie(): PageSnapshot;
consoleMessages(): playwright.ConsoleMessage[];
requests(): Map<playwright.Request, playwright.Response | null>;
captureSnapshot(): Promise<void>;
}