UNPKG

webdriverio

Version:

Next-gen browser and mobile automation test framework for Node.js

29 lines • 2.26 kB
import type { FakeTimerInstallOpts } from '@sinonjs/fake-timers'; import type { remote } from 'webdriver'; import { ClockManager } from '../../clock.js'; import { type DeviceName } from '../../deviceDescriptorsSource.js'; type RestoreFunction = () => Promise<any>; type ColorScheme = 'light' | 'dark'; type ScrollbarType = 'classic' | 'overlay'; type GeolocationEmulation = Partial<GeolocationCoordinates> | { error: 'positionUnavailable'; }; export declare function emulate(scope: 'clock', options?: FakeTimerInstallOpts): Promise<ClockManager>; export declare function emulate(scope: 'geolocation', geolocation: GeolocationEmulation): Promise<RestoreFunction>; export declare function emulate(scope: 'userAgent', userAgent: string): Promise<RestoreFunction>; export declare function emulate(scope: 'device', device: DeviceName): Promise<RestoreFunction>; export declare function emulate(scope: 'colorScheme', colorScheme: ColorScheme): Promise<RestoreFunction>; export declare function emulate(scope: 'media', features: remote.EmulationMediaFeatures): Promise<RestoreFunction>; export declare function emulate(scope: 'onLine', state: boolean): Promise<RestoreFunction>; export declare function emulate(scope: 'locale', locale: string): Promise<RestoreFunction>; export declare function emulate(scope: 'timezone', timezone: string): Promise<RestoreFunction>; export declare function emulate(scope: 'touch', maxTouchPoints: number): Promise<RestoreFunction>; export declare function emulate(scope: 'orientation', orientation: remote.EmulationScreenOrientation): Promise<RestoreFunction>; export declare function emulate(scope: 'screen', screen: remote.EmulationScreenArea): Promise<RestoreFunction>; export declare function emulate(scope: 'viewportMeta', viewportMeta: true): Promise<RestoreFunction>; export declare function emulate(scope: 'textLayout', textLayout: 'mobile'): Promise<RestoreFunction>; export declare function emulate(scope: 'scripting', enabled: false): Promise<RestoreFunction>; export declare function emulate(scope: 'scrollbar', scrollbarType: ScrollbarType): Promise<RestoreFunction>; export declare function emulate(scope: 'forcedColors', theme: ColorScheme): Promise<RestoreFunction>; export {}; //# sourceMappingURL=emulate.d.ts.map