UNPKG

1.67 kBTypeScriptView Raw
1import type { Capabilities } from '@wdio/types';
2import command from './command.js';
3import { DEFAULTS } from './constants.js';
4import type { BidiHandler } from './bidi/handler.js';
5import { getPrototype, getEnvironmentVars, initiateBidi, parseBidiMessage } from './utils.js';
6import type { Client, AttachOptions } from './types.js';
7export default class WebDriver {
8 static newSession(options: Capabilities.RemoteConfig, modifier?: (...args: any[]) => any, userPrototype?: {}, customCommandWrapper?: (...args: any[]) => any): Promise<Client>;
9 /**
10 * allows user to attach to existing sessions
11 */
12 static attachToSession(options?: AttachOptions, modifier?: (...args: any[]) => any, userPrototype?: {}, commandWrapper?: (...args: any[]) => any): Client;
13 /**
14 * Changes The instance session id and browser capabilities for the new session
15 * directly into the passed in browser object
16 *
17 * @param {object} instance the object we get from a new browser session.
18 * @returns {string} the new session id of the browser
19 */
20 static reloadSession(instance: Client & {
21 _bidiHandler?: BidiHandler;
22 }, newCapabilities?: WebdriverIO.Capabilities): Promise<string>;
23 static get WebDriver(): typeof WebDriver;
24}
25/**
26 * Helper methods consumed by webdriverio package
27 */
28export { getPrototype, DEFAULTS, command, getEnvironmentVars, initiateBidi, parseBidiMessage, WebDriver };
29export * from './types.js';
30export * from './constants.js';
31export * from './bidi/handler.js';
32export * as local from './bidi/localTypes.js';
33export * as remote from './bidi/remoteTypes.js';
34//# sourceMappingURL=index.d.ts.map
\No newline at end of file