1 | import type { EventEmitter } from 'node:events';
|
2 | import type { remote, SessionFlags, AttachOptions as WebDriverAttachOptions, BidiHandler, EventMap } from 'webdriver';
|
3 | import type { Capabilities, Options, ThenArg } from '@wdio/types';
|
4 | import type { ElementReference, ProtocolCommands } from '@wdio/protocols';
|
5 | import type { Browser as PuppeteerBrowser } from 'puppeteer-core';
|
6 | import type { Dialog as DialogImport } from './session/dialog.js';
|
7 | import type * as BrowserCommands from './commands/browser.js';
|
8 | import type * as ElementCommands from './commands/element.js';
|
9 | import type { Button, ButtonNames } from './utils/actions/pointer.js';
|
10 | import type WebDriverInterception from './utils/interception/index.js';
|
11 |
|
12 |
|
13 |
|
14 | export * from './utils/interception/types.js';
|
15 |
|
16 |
|
17 |
|
18 | export * from './utils/actions/index.js';
|
19 |
|
20 |
|
21 |
|
22 | export { InitScript } from './commands/browser/addInitScript.js';
|
23 | type $BrowserCommands = typeof BrowserCommands;
|
24 | type $ElementCommands = typeof ElementCommands;
|
25 | type ElementQueryCommands = '$' | 'custom$' | 'shadow$' | 'react$';
|
26 | type ElementsQueryCommands = '$$' | 'custom$$' | 'shadow$$' | 'react$$';
|
27 | type ChainablePrototype = {
|
28 | [K in ElementQueryCommands]: (...args: Parameters<$ElementCommands[K]>) => ChainablePromiseElement;
|
29 | } & {
|
30 | [K in ElementsQueryCommands]: (...args: Parameters<$ElementCommands[K]>) => ChainablePromiseArray;
|
31 | };
|
32 | type AsyncElementProto = {
|
33 | [K in keyof Omit<$ElementCommands, keyof ChainablePrototype>]: OmitThisParameter<$ElementCommands[K]>;
|
34 | } & ChainablePrototype;
|
35 | interface ChainablePromiseBaseElement {
|
36 | |
37 |
|
38 |
|
39 | elementId: Promise<string>;
|
40 | |
41 |
|
42 |
|
43 | parent: Promise<WebdriverIO.Element | WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser>;
|
44 | |
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | selector: Promise<Selector>;
|
51 | |
52 |
|
53 |
|
54 | error?: Promise<Error>;
|
55 | |
56 |
|
57 |
|
58 | index?: Promise<number>;
|
59 | |
60 |
|
61 |
|
62 | getElement(): Promise<WebdriverIO.Element>;
|
63 | }
|
64 | export interface ChainablePromiseElement extends ChainablePromiseBaseElement, AsyncElementProto, Omit<WebdriverIO.Element, keyof ChainablePromiseBaseElement | keyof AsyncElementProto> {
|
65 | }
|
66 | interface AsyncIterators<T> {
|
67 | |
68 |
|
69 |
|
70 | forEach: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => void, thisArg?: T) => Promise<void>;
|
71 | forEachSeries: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => void, thisArg?: T) => Promise<void>;
|
72 | map: <U>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => U | Promise<U>, thisArg?: T) => Promise<U[]>;
|
73 | mapSeries: <T, U>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => U | Promise<U>, thisArg?: T) => Promise<U[]>;
|
74 | find: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<T>;
|
75 | findSeries: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<T>;
|
76 | findIndex: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<number>;
|
77 | findIndexSeries: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<number>;
|
78 | some: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<boolean>;
|
79 | someSeries: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<boolean>;
|
80 | every: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<boolean>;
|
81 | everySeries: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<boolean>;
|
82 | filter: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<WebdriverIO.Element[]>;
|
83 | filterSeries: <T>(callback: (currentValue: WebdriverIO.Element, index: number, array: T[]) => boolean | Promise<boolean>, thisArg?: T) => Promise<WebdriverIO.Element[]>;
|
84 | reduce: <T, U>(callback: (accumulator: U, currentValue: WebdriverIO.Element, currentIndex: number, array: T[]) => U | Promise<U>, initialValue?: U) => Promise<U>;
|
85 | }
|
86 | export interface ChainablePromiseArray extends AsyncIterators<WebdriverIO.Element> {
|
87 | [Symbol.asyncIterator](): AsyncIterableIterator<WebdriverIO.Element>;
|
88 | [Symbol.iterator](): IterableIterator<WebdriverIO.Element>;
|
89 | |
90 |
|
91 |
|
92 | length: Promise<number>;
|
93 | |
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | selector: Promise<Selector>;
|
100 | |
101 |
|
102 |
|
103 | parent: Promise<WebdriverIO.Element | WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser>;
|
104 | |
105 |
|
106 |
|
107 | [n: number]: ChainablePromiseElement;
|
108 | |
109 |
|
110 |
|
111 | getElements(): Promise<WebdriverIO.ElementArray>;
|
112 | }
|
113 | export type BrowserCommandsType = Omit<$BrowserCommands, keyof ChainablePrototype> & ChainablePrototype;
|
114 | export type ElementCommandsType = Omit<$ElementCommands, keyof ChainablePrototype> & ChainablePrototype;
|
115 |
|
116 |
|
117 |
|
118 | type SingleElementCommandNames = '$' | 'custom$' | 'react$';
|
119 | type MultiElementCommandNames = '$$' | 'custom$$' | 'react$$';
|
120 | type ElementCommandNames = SingleElementCommandNames | MultiElementCommandNames;
|
121 | type MultiRemoteElementCommands = {
|
122 | [K in keyof Pick<BrowserCommandsType, SingleElementCommandNames>]: (...args: Parameters<BrowserCommandsType[K]>) => ThenArg<WebdriverIO.MultiRemoteElement>;
|
123 | } & {
|
124 | [K in keyof Pick<BrowserCommandsType, MultiElementCommandNames>]: (...args: Parameters<BrowserCommandsType[K]>) => ThenArg<WebdriverIO.MultiRemoteElement[]>;
|
125 | };
|
126 | export type MultiRemoteBrowserCommandsType = {
|
127 | [K in keyof Omit<BrowserCommandsType, ElementCommandNames | 'SESSION_MOCKS' | 'CDP_SESSIONS'>]: (...args: Parameters<BrowserCommandsType[K]>) => Promise<ThenArg<ReturnType<BrowserCommandsType[K]>>[]>;
|
128 | } & MultiRemoteElementCommands;
|
129 | export type MultiRemoteElementCommandsType = {
|
130 | [K in keyof Omit<ElementCommandsType, ElementCommandNames>]: (...args: Parameters<ElementCommandsType[K]>) => Promise<ThenArg<ReturnType<ElementCommandsType[K]>>[]>;
|
131 | } & MultiRemoteElementCommands;
|
132 | export type MultiRemoteProtocolCommandsType = {
|
133 | [K in keyof ProtocolCommands]: (...args: Parameters<ProtocolCommands[K]>) => Promise<ThenArg<ReturnType<ProtocolCommands[K]>>[]>;
|
134 | };
|
135 | interface ElementArrayExport extends Omit<Array<WebdriverIO.Element>, keyof AsyncIterators<WebdriverIO.Element>>, AsyncIterators<WebdriverIO.Element> {
|
136 | |
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 | selector: Selector;
|
143 | |
144 |
|
145 |
|
146 | parent: WebdriverIO.Element | WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser;
|
147 | |
148 |
|
149 |
|
150 | foundWith: string;
|
151 | |
152 |
|
153 |
|
154 | props: any[];
|
155 | |
156 |
|
157 |
|
158 | length: number;
|
159 | |
160 |
|
161 |
|
162 | getElements(): Promise<WebdriverIO.ElementArray>;
|
163 | }
|
164 | export type ElementArray = ElementArrayExport;
|
165 | type AddCommandFnScoped<InstanceType = WebdriverIO.Browser, IsElement extends boolean = false> = (this: IsElement extends true ? Element : InstanceType, ...args: any[]) => any;
|
166 | export type AddCommandFn = (...args: any[]) => any;
|
167 | type OverwriteCommandFnScoped<ElementKey extends keyof $ElementCommands, BrowserKey extends keyof $BrowserCommands, IsElement extends boolean = false> = (this: IsElement extends true ? WebdriverIO.Element : WebdriverIO.Browser, origCommand: (...args: any[]) => IsElement extends true ? $ElementCommands[ElementKey] : $BrowserCommands[BrowserKey], ...args: any[]) => Promise<any>;
|
168 | type OverwriteCommandFn<ElementKey extends keyof $ElementCommands, BrowserKey extends keyof $BrowserCommands, IsElement extends boolean = false> = (origCommand: (...args: any[]) => IsElement extends true ? $ElementCommands[ElementKey] : $BrowserCommands[BrowserKey], ...args: any[]) => Promise<any>;
|
169 | export type CustomLocatorReturnValue = HTMLElement | HTMLElement[] | NodeListOf<HTMLElement>;
|
170 | export interface CustomInstanceCommands<T> {
|
171 | |
172 |
|
173 |
|
174 | addCommand<IsElement extends boolean = false>(name: string, func: AddCommandFn | AddCommandFnScoped<T, IsElement>, attachToElement?: IsElement, proto?: Record<string, any>, instances?: Record<string, WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser>): void;
|
175 | |
176 |
|
177 |
|
178 | overwriteCommand<ElementKey extends keyof $ElementCommands, BrowserKey extends keyof $BrowserCommands, IsElement extends boolean = false>(name: IsElement extends true ? ElementKey : BrowserKey, func: OverwriteCommandFn<ElementKey, BrowserKey, IsElement> | OverwriteCommandFnScoped<ElementKey, BrowserKey, IsElement>, attachToElement?: IsElement, proto?: Record<string, any>, instances?: Record<string, WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser>): void;
|
179 | |
180 |
|
181 |
|
182 | addLocatorStrategy(name: string, func: ((selector: string, root: HTMLElement) => CustomLocatorReturnValue) | ((selector: string) => CustomLocatorReturnValue)): void;
|
183 | }
|
184 | interface InstanceBase extends EventEmitter, SessionFlags {
|
185 | /**
|
186 | * Session id for the current running session
|
187 | */
|
188 | sessionId: string;
|
189 | /**
|
190 | * Applied WebdriverIO options (options that aren't officially part of WebdriverIO are stripped
|
191 | * out of this object).
|
192 | */
|
193 | options: Options.WebdriverIO | Options.Testrunner;
|
194 | /**
|
195 | * Puppeteer instance
|
196 | */
|
197 | puppeteer?: PuppeteerBrowser;
|
198 | strategies: Map<any, any>;
|
199 | commandList: string[];
|
200 | /**
|
201 | * @private
|
202 | */
|
203 | __propertiesObject__: Record<string, PropertyDescriptor>;
|
204 | /**
|
205 | * @private
|
206 | */
|
207 | wdioRetries?: number;
|
208 | }
|
209 | /**
|
210 | * a browser base that has everything besides commands which are defined for sync and async separately
|
211 | */
|
212 | export interface BrowserBase extends InstanceBase, CustomInstanceCommands<WebdriverIO.Browser> {
|
213 | isMultiremote: false;
|
214 | /**
|
215 | * capabilities of the browser instance
|
216 | */
|
217 | capabilities: WebdriverIO.Capabilities;
|
218 | }
|
219 | export type WebdriverIOEventMap = EventMap & {
|
220 | 'dialog': WebdriverIO.Dialog;
|
221 | };
|
222 | interface BidiEventHandler {
|
223 | on<K extends keyof WebdriverIOEventMap>(event: K, listener: (this: WebdriverIO.Browser, param: WebdriverIOEventMap[K]) => void): this;
|
224 | once<K extends keyof WebdriverIOEventMap>(event: K, listener: (this: WebdriverIO.Browser, param: WebdriverIOEventMap[K]) => void): this;
|
225 | }
|
226 | /**
|
227 | * @private
|
228 | */
|
229 | export interface Browser extends Omit<BrowserBase, 'on' | 'once'>, BidiEventHandler, BidiHandler, ProtocolCommands, BrowserCommandsType {
|
230 | }
|
231 | /**
|
232 | * export a browser interface that can be used for typing plugins
|
233 | */
|
234 | export interface ElementBase extends InstanceBase, ElementReference, CustomInstanceCommands<WebdriverIO.Element> {
|
235 | /**
|
236 | * capabilities of the browser instance
|
237 | */
|
238 | capabilities: WebdriverIO.Capabilities;
|
239 | /**
|
240 | * WebDriver element reference
|
241 | */
|
242 | elementId: string;
|
243 | /**
|
244 | * WebDriver element reference
|
245 | */
|
246 | ELEMENT: string;
|
247 | /**
|
248 | * selector used to fetch this element, can be
|
249 | * - undefined if element was created via `$({ 'element-6066-11e4-a52e-4f735466cecf': 'ELEMENT-1' })`
|
250 | * - a string if `findElement` was used and a reference was found
|
251 | * - or a functin if element was found via e.g. `$(() => document.body)`
|
252 | */
|
253 | selector: Selector;
|
254 | /**
|
255 | * index of the element if fetched with `$$`
|
256 | */
|
257 | index?: number;
|
258 | /**
|
259 | * parent of the element if fetched via `$(parent).$(child)`
|
260 | */
|
261 | parent: WebdriverIO.Element | WebdriverIO.Browser;
|
262 | /**
|
263 | * true if element is a React component
|
264 | */
|
265 | isReactElement?: boolean;
|
266 | /**
|
267 | * true if element was queried from a shadow root
|
268 | */
|
269 | isShadowElement?: boolean;
|
270 | /**
|
271 | * error response if element was not found
|
272 | */
|
273 | error?: Error;
|
274 | /**
|
275 | * locator of the element
|
276 | * @requires WebDriver Bidi
|
277 | */
|
278 | locator?: remote.BrowsingContextLocator;
|
279 | }
|
280 | /**
|
281 | * @deprecated use `WebdriverIO.Element` instead
|
282 | */
|
283 | export interface Element extends ElementBase, ProtocolCommands, ElementCommandsType {
|
284 | }
|
285 | interface MultiRemoteBase extends Omit<InstanceBase, 'sessionId'>, CustomInstanceCommands<WebdriverIO.MultiRemoteBrowser> {
|
286 | /**
|
287 | * capabilities of the browser instance
|
288 | */
|
289 | capabilities: Capabilities.RequestedMultiremoteCapabilities;
|
290 | /**
|
291 | * multiremote browser instance names
|
292 | */
|
293 | instances: string[];
|
294 | /**
|
295 | * flag to indicate multiremote browser session
|
296 | */
|
297 | isMultiremote: true;
|
298 | /**
|
299 | * get a specific instance to run commands on it
|
300 | */
|
301 | getInstance: (browserName: string) => WebdriverIO.Browser;
|
302 | }
|
303 | interface MultiRemoteElementBase {
|
304 | selector: string;
|
305 | |
306 |
|
307 |
|
308 | instances: string[];
|
309 | commandList: string[];
|
310 | addCommand: Function;
|
311 | overwriteCommand: Function;
|
312 | |
313 |
|
314 |
|
315 | isMultiremote: true;
|
316 | |
317 |
|
318 |
|
319 | getInstance: (browserName: string) => WebdriverIO.Element;
|
320 | __propertiesObject__: never;
|
321 | }
|
322 | interface MultiRemoteBrowserType extends MultiRemoteBase, MultiRemoteBrowserCommandsType, MultiRemoteProtocolCommandsType {
|
323 | }
|
324 |
|
325 |
|
326 |
|
327 | export interface MultiRemoteBrowser extends MultiRemoteBrowserType {
|
328 | }
|
329 | interface MultiRemoteElementType extends MultiRemoteElementBase, MultiRemoteProtocolCommandsType, Omit<MultiRemoteBrowserCommandsType, keyof MultiRemoteElementCommandsType>, MultiRemoteElementCommandsType {
|
330 | }
|
331 |
|
332 |
|
333 |
|
334 | export interface MultiRemoteElement extends MultiRemoteElementType {
|
335 | }
|
336 | export type ElementFunction = ((elem: HTMLElement) => HTMLElement | undefined) | ((elem: HTMLElement) => (HTMLElement | undefined)[]);
|
337 | export type CustomStrategyFunction = (...args: any) => ElementReference | ElementReference[];
|
338 | export type CustomStrategyReference = {
|
339 | strategy: CustomStrategyFunction;
|
340 | strategyName: string;
|
341 | strategyArguments: any[];
|
342 | };
|
343 | export type Selector = string | ElementReference | ElementFunction | CustomStrategyReference | HTMLElement;
|
344 | interface CSSValue {
|
345 | type: string;
|
346 | string: string;
|
347 | unit: string;
|
348 | value: any;
|
349 | }
|
350 | interface ParsedColor extends Partial<CSSValue> {
|
351 | rgb?: string;
|
352 | rgba?: string;
|
353 | hex?: string;
|
354 | }
|
355 | export interface ParsedCSSValue {
|
356 | property?: string;
|
357 | value?: string;
|
358 | parsed: ParsedColor;
|
359 | }
|
360 | interface NoneActionEntity {
|
361 | type: 'pause';
|
362 | duration: number;
|
363 | }
|
364 | interface PointerActionEntity {
|
365 | type: 'pointerMove' | 'pointerDown' | 'pointerUp' | 'pointerCancel' | 'pause';
|
366 | duration?: number;
|
367 | x?: number;
|
368 | y?: number;
|
369 | button?: number;
|
370 | }
|
371 | interface KeyActionEntity {
|
372 | type: 'keyUp' | 'keyDown';
|
373 | duration?: number;
|
374 | value?: string;
|
375 | }
|
376 | export interface Action {
|
377 | id: string;
|
378 | actions: (NoneActionEntity | PointerActionEntity | KeyActionEntity)[];
|
379 | type?: 'pointer' | 'key';
|
380 | parameters?: {
|
381 | pointerType: 'mouse' | 'pen' | 'touch';
|
382 | };
|
383 | }
|
384 | export interface ActionParameter {
|
385 | actions: Action[];
|
386 | }
|
387 | export type ActionTypes = 'press' | 'longPress' | 'tap' | 'moveTo' | 'wait' | 'release';
|
388 | export interface TouchAction {
|
389 | action: ActionTypes;
|
390 | x?: number;
|
391 | y?: number;
|
392 | element?: WebdriverIO.Element;
|
393 | ms?: number;
|
394 | }
|
395 | export type TouchActionParameter = string | string[] | TouchAction | TouchAction[];
|
396 | export type TouchActions = TouchActionParameter | TouchActionParameter[];
|
397 | export type Matcher = {
|
398 | name: string;
|
399 | args: Array<string | object>;
|
400 | class?: string;
|
401 | };
|
402 | export type ReactSelectorOptions = {
|
403 | props?: Record<string, unknown>;
|
404 | state?: Record<string, unknown>;
|
405 | };
|
406 | export type MoveToOptions = {
|
407 | xOffset?: number;
|
408 | yOffset?: number;
|
409 | };
|
410 | export type DragAndDropOptions = {
|
411 | duration?: number;
|
412 | };
|
413 | export type NewWindowOptions = {
|
414 | type?: 'tab' | 'window';
|
415 | windowName?: string;
|
416 | windowFeatures?: string;
|
417 | };
|
418 | export type TapOptions = MobileScrollIntoViewOptions & {
|
419 | x?: number;
|
420 | y?: number;
|
421 | };
|
422 | export type LongPressOptions = {
|
423 | x: number;
|
424 | y: number;
|
425 | duration: number;
|
426 | };
|
427 | export type ClickOptions = LongPressOptions & {
|
428 | button: Button | ButtonNames;
|
429 | skipRelease: boolean;
|
430 | };
|
431 | export type PinchAndZoomOptions = {
|
432 | duration: number;
|
433 | scale: number;
|
434 | };
|
435 | export type WaitForOptions = {
|
436 | timeout?: number;
|
437 | interval?: number;
|
438 | timeoutMsg?: string;
|
439 | reverse?: boolean;
|
440 | withinViewport?: boolean;
|
441 | };
|
442 | export declare enum MobileScrollDirection {
|
443 | Down = "down",
|
444 | Up = "up",
|
445 | Left = "left",
|
446 | Right = "right"
|
447 | }
|
448 | export type XY = {
|
449 | x: number;
|
450 | y: number;
|
451 | };
|
452 | export type SwipeOptions = {
|
453 | direction?: `${MobileScrollDirection}`;
|
454 | duration?: number;
|
455 | from?: XY;
|
456 | percent?: number;
|
457 | scrollableElement?: WebdriverIO.Element | ChainablePromiseElement;
|
458 | to?: XY;
|
459 | };
|
460 | export type MobileScrollIntoViewOptions = SwipeOptions & {
|
461 | maxScrolls?: number;
|
462 | };
|
463 | export interface CustomScrollIntoViewOptions extends ScrollIntoViewOptions, MobileScrollIntoViewOptions {
|
464 | }
|
465 | export type WaitUntilOptions = {
|
466 | timeout?: number;
|
467 | timeoutMsg?: string;
|
468 | interval?: number;
|
469 | };
|
470 | export type DragAndDropCoordinate = {
|
471 | x: number;
|
472 | y: number;
|
473 | };
|
474 | export interface AttachOptions extends Omit<WebDriverAttachOptions, 'capabilities'> {
|
475 | options?: Options.WebdriverIO;
|
476 | capabilities?: WebDriverAttachOptions['capabilities'];
|
477 | requestedCapabilities?: WebDriverAttachOptions['capabilities'];
|
478 | }
|
479 | export type ThrottlePreset = 'offline' | 'GPRS' | 'Regular2G' | 'Good2G' | 'Regular3G' | 'Good3G' | 'Regular4G' | 'DSL' | 'WiFi' | 'online';
|
480 | export interface CustomThrottle {
|
481 | offline: boolean;
|
482 | downloadThroughput: number;
|
483 | uploadThroughput: number;
|
484 | latency: number;
|
485 | }
|
486 | export type ThrottleOptions = ThrottlePreset | CustomThrottle;
|
487 | export interface ExtendedElementReference {
|
488 | 'element-6066-11e4-a52e-4f735466cecf': string;
|
489 | locator: remote.BrowsingContextLocator;
|
490 | }
|
491 | export type SupportedScopes = 'geolocation' | 'userAgent' | 'colorScheme' | 'onLine' | 'clock' | 'device';
|
492 | export type RestoreMap = Map<SupportedScopes, (() => Promise<any>)[]>;
|
493 | declare global {
|
494 | namespace WebdriverIO {
|
495 | /**
|
496 | * WebdriverIO browser object
|
497 | * @see https://webdriver.io/docs/api/browser
|
498 | */
|
499 | interface Browser extends Omit<BrowserBase, 'on' | 'once'>, BidiEventHandler, BidiHandler, ProtocolCommands, BrowserCommandsType {
|
500 | }
|
501 | /**
|
502 | * WebdriverIO element object
|
503 | * @see https://webdriver.io/docs/api/element
|
504 | */
|
505 | interface Element extends ElementBase, ProtocolCommands, ElementCommandsType {
|
506 | }
|
507 | /**
|
508 | * WebdriverIO element array
|
509 | * When fetching elements via `$$`, `custom$$` or `shadow$$` commands an array of elements
|
510 | * is returns. This array has extended prototype properties to provide information about
|
511 | * the parent element, selector and properties of the fetched elements. This is useful to
|
512 | * e.g. re-fetch the set in case no elements got returned.
|
513 | */
|
514 | interface ElementArray extends ElementArrayExport {
|
515 | }
|
516 | /**
|
517 | * WebdriverIO multiremote browser object
|
518 | * A multiremote browser instance is a property on the global WebdriverIO browser object that
|
519 | * allows to control multiple browser instances at once. It can be represented as `Record<string, WebdriverIO.Browser>`
|
520 | * where `string` is the capability name defined in the WebdriverIO options.
|
521 | *
|
522 | * @see https://webdriver.io/docs/multiremote/
|
523 | */
|
524 | interface MultiRemoteBrowser extends MultiRemoteBrowserType {
|
525 | }
|
526 | /**
|
527 | * WebdriverIO multiremote browser object
|
528 | * A multiremote browser instance is a property on the global WebdriverIO browser object that
|
529 | * allows to control multiple browser instances at once. It can be represented as `Record<string, WebdriverIO.Element>`
|
530 | * where `string` is the capability name defined in the WebdriverIO options.
|
531 | *
|
532 | * @see https://webdriver.io/docs/multiremote/
|
533 | */
|
534 | interface MultiRemoteElement extends MultiRemoteElementType {
|
535 | }
|
536 | /**
|
537 | * WebdriverIO Mock object
|
538 | * The mock object is an object that represents a network mock and contains information about
|
539 | * requests that were matching given url and filterOptions. It can be received using the mock command.
|
540 | *
|
541 | * @see https://webdriver.io/docs/api/mock
|
542 | */
|
543 | interface Mock extends WebDriverInterception {
|
544 | }
|
545 | /**
|
546 | * WebdriverIO Dialog object
|
547 | * The dialog object represents a user prompt that was triggered by the browser. It contains
|
548 | * information about the message, type and default value of the prompt.
|
549 | * It can be received using the `on('dialog')` event.
|
550 | *
|
551 | * @see https://webdriver.io/docs/api/dialog
|
552 | */
|
553 | interface Dialog extends DialogImport {
|
554 | }
|
555 | }
|
556 | }
|
557 | //# sourceMappingURL=types.d.ts.map |
\ | No newline at end of file |