import type { WdioMultiRemoteMockMaybePromise } from '../types.js'; import type { MultiRemoteValues } from '../publicTypes/expectWebdriverIO.js'; export declare const isMultiRemoteValues: (value: unknown, existingInstanceNames?: string[]) => value is MultiRemoteValues; /** Strict multi-remote check: the per-instance expected values must name exactly the instances, no more, no less. */ export declare const hasSameInstanceNames: (expected: MultiRemoteValues, instances: string[]) => boolean; /** Brand of `expect.multiRemote()`, through the global symbol registry to be recognized across module instances */ export declare const MULTI_REMOTE_MATCHER_SYMBOL: unique symbol; /** Whether the value is an `expect.multiRemote()` matcher, holding one expected value per instance in its `sample` */ export declare const isMultiRemoteMatcher: (value: unknown) => value is { sample: MultiRemoteValues; }; /** * The expected values per multi-remote instance, or `undefined` for a single expected value shared by every instance. * - `expect.multiRemote({ chrome: ..., firefox: ... })` always holds per-instance values. * - A plain object is the per-instance shorthand, except for matchers whose expected value can itself be a plain object * (e.g. `toHaveStyle`, `toHaveSize`): for them it is always a literal, and `expect.multiRemote()` must be used. * Instance names are not used to tell them apart, so unknown or misspelled ones are caught by `hasSameInstanceNames`. */ export declare const getPerInstanceValues: (value: unknown, { allowObjectExpectedValue }?: { allowObjectExpectedValue?: boolean | undefined; }) => MultiRemoteValues | undefined; /** * Splits a multi-remote `$$()` result back into each instance's own elements. * WebdriverIO zips the per-instance results by index, so when instances find a different number of elements the * trailing wrappers hold no element for the instances that found fewer (and `getInstance` then throws). */ export declare const getElementsPerInstance: (elements: WebdriverIO.MultiRemoteElementArray | readonly WebdriverIO.MultiRemoteElement[], instances: string[]) => MultiRemoteValues; /** A `WebdriverIO.Mock` of one browser */ export declare const isMock: (obj: unknown) => obj is WebdriverIO.Mock; /** A multi-remote `mock()`: a `MultiRemoteMock`, which is not an array and has no `calls` */ export declare const isMultiRemoteMock: (obj: unknown) => obj is WebdriverIO.MultiRemoteMock; /** The mock of each instance of a `MultiRemoteMock`, with the instance names, in its order (also after `select()`) */ export type InstanceMocks = { names: string[]; mocks: WebdriverIO.Mock[]; }; /** * The received mock of a network matcher, awaiting a not-awaited `mock()`. A `MultiRemoteMock` gives its mocks, one per instance. * An array is rejected: since WebdriverIO v10, a multi-remote `mock()` is a `MultiRemoteMock`. */ export declare const awaitMocks: (received: WebdriverIO.Mock | WdioMultiRemoteMockMaybePromise) => Promise; export declare const isInstanceMocks: (mocks: WebdriverIO.Mock | InstanceMocks) => mocks is InstanceMocks; /** * Reads the property without `in`: the `@wdio/globals` browser is a Proxy of a class with only a `get` trap. */ export declare const hasMultiRemoteFlag: (obj: unknown) => boolean; export declare const isMultiRemoteBrowser: (browser: WebdriverIO.Browser | WebdriverIO.BrowsingContext | WebdriverIO.MultiRemoteBrowser) => browser is WebdriverIO.MultiRemoteBrowser; /** * A browser, multi-remote or not, or a browsing context (a tab, a window or a frame), which is a browser subject of one browser */ export declare const isBrowser: (obj: unknown) => obj is WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser; /** A browsing context: a tab, a window or a frame, with its own commands, but no session command such as `setPermissions` */ export declare const isBrowsingContext: (obj: unknown) => obj is WebdriverIO.BrowsingContext;