import type { Browser } from 'webdriverio'; import type { Options } from '@wdio/types'; export type BrowserType = 'chrome' | 'firefox' | 'safari' | 'edge' | 'ios_safari' | 'android_chrome'; export interface MobileOptions { deviceName?: string; platformVersion?: string; udid?: string; deviceId?: string; orientation?: 'PORTRAIT' | 'LANDSCAPE'; automationName?: 'XCUITest' | 'UiAutomator2'; noReset?: boolean; fullReset?: boolean; app?: string; bundleId?: string; packageName?: string; } export interface BrowserOptions { headless?: boolean; version?: string; args?: string[]; profile?: { id?: string; name?: string; path?: string; exportPath?: string; reuse?: boolean; }; mobile?: MobileOptions; } export interface BrowserCapabilities { browserName: string; capabilities: { browserName: string; platformName?: string; 'appium:automationName'?: string; 'appium:deviceName'?: string; 'appium:platformVersion'?: string; 'appium:udid'?: string; 'appium:deviceId'?: string; 'appium:orientation'?: string; 'appium:noReset'?: boolean; 'appium:fullReset'?: boolean; 'appium:app'?: string; 'appium:bundleId'?: string; 'appium:packageName'?: string; [key: string]: any; }; logLevel: Options.WebdriverIO['logLevel']; automationProtocol: Options.WebdriverIO['automationProtocol']; } export interface BrowserSession { id: string; browser: Browser; createdAt: Date; } export interface BrowserProfile { id: string; name: string; browserType: BrowserType; options: BrowserOptions; createdAt: Date; lastUsed: Date; metadata?: { description?: string; tags?: string[]; [key: string]: any; }; } export interface ProfileManager { createProfile(options: Omit): Promise; getProfile(id: string): Promise; listProfiles(filter?: Partial): Promise; updateProfile(id: string, updates: Partial): Promise; deleteProfile(id: string): Promise; exportProfile(id: string): Promise; importProfile(path: string): Promise; } export interface BrowserManager { getCapabilities(options?: BrowserOptions): Promise; validateInstallation(): Promise; getBinaryPath(version?: string): Promise; getDefaultArgs(options?: BrowserOptions): string[]; getProfileManager(): ProfileManager; createProfile(options: Omit): Promise; getProfilePath(profileId: string): Promise; } export type MobileDeviceType = 'ios' | 'android'; export interface MobileDevice { type: MobileDeviceType; name: string; version: string; udid?: string; deviceId?: string; isAvailable: boolean; } export interface MobileBrowserManager extends BrowserManager { getDeviceInfo(): Promise; validateDevice(deviceId: string): Promise; getDeviceCapabilities(deviceId: string): Promise; }