import type { MaybeSomeWdioElementOrArrayMaybePromiseOrMultiRemoteElements, WdioMatcherContext, WdioMultiRemoteElements } from '../types.js'; import { browserStringGetters, elementBooleanGetters, elementNumberGetters, elementStringGetters } from './descriptors.js'; import type { AssertionResult, CommandOptions, StringOptions } from '../publicTypes/options.js'; import type { ExpectedOf } from '../publicTypes/expectWebdriverIO.js'; import type { MaybeArrayOrMultiRemoteWithArrayValuesOrOneOf, MultiRemoteValuesOrOneOf } from '../publicTypes/expectWebdriverIO.js'; type ElementStringGetter = keyof typeof elementStringGetters; /** The string matchers whose getter argument is given in the call, e.g. `toHaveAttribute(name, value)` */ type ArgumentFromCall = { [Name in ElementStringGetter]: (typeof elementStringGetters)[Name] extends { argument: 'fromCall'; } ? Name : never; }[ElementStringGetter]; /** * A string matcher with no getter argument, or a fixed one (`toHaveId` is `getAttribute('id')`): * `toHaveX(expectedValue, options)`. The hooks get the expected value alone. */ export declare const elementStringGetterMatcher: (name: Exclude) => (this: WdioMatcherContext, received: MaybeSomeWdioElementOrArrayMaybePromiseOrMultiRemoteElements, expectedValue: MaybeArrayOrMultiRemoteWithArrayValuesOrOneOf>, options?: Options) => Promise; /** * A string matcher whose getter argument is given in the call: `toHaveAttribute(name, expectedValue, options)`. With no * expected value, the value exists (`expect.anything()`). The hooks get `[name, expectedValue]`, as the user gave them. */ export declare const elementArgumentGetterMatcher: (name: ArgumentFromCall) => (this: WdioMatcherContext, received: MaybeSomeWdioElementOrArrayMaybePromiseOrMultiRemoteElements | WdioMultiRemoteElements, argument: string, value?: unknown, options?: StringOptions) => Promise; type BrowserTarget = WebdriverIO.Browser | WebdriverIO.BrowsingContext; type BrowserStringGetter = keyof typeof browserStringGetters; /** The browser matchers whose getter argument is given in the call, e.g. `toHaveCookie(name, value)` */ type BrowserArgumentFromCall = { [Name in BrowserStringGetter]: (typeof browserStringGetters)[Name] extends { argument: 'fromCall'; } ? Name : never; }[BrowserStringGetter]; /** * A string matcher of the browser, a browsing context and the multi-remote browser, with no getter argument: * `toHaveTitle(expectedValue, options)`. The hooks get the expected value alone. */ export declare const browserStringGetterMatcher: (name: Exclude) => (this: ExpectWebdriverIO.MatcherContext | WdioMatcherContext, browser: BrowserTarget | WebdriverIO.MultiRemoteBrowser, expectedValue: MultiRemoteValuesOrOneOf>, options?: StringOptions) => Promise; /** * A string matcher of the browser whose getter argument is given in the call: `toHaveCookie(name, expectedValue, options)`. * With no expected value, the value exists (`expect.anything()`). The hooks get `[name, expectedValue]`. */ export declare const browserArgumentGetterMatcher: (name: BrowserArgumentFromCall) => (this: ExpectWebdriverIO.MatcherContext | WdioMatcherContext, browser: BrowserTarget | WebdriverIO.MultiRemoteBrowser, argument: string, value?: unknown, options?: StringOptions) => Promise; /** * A boolean matcher of `$()`, `$$()` and multi-remote elements, made from its descriptor in `elementBooleanGetters`: the * getter gives the state of each element, and `executeCommandBe()` checks that it is `true`. */ export declare const elementBooleanGetterMatcher: (name: keyof typeof elementBooleanGetters) => (this: WdioMatcherContext, received: MaybeSomeWdioElementOrArrayMaybePromiseOrMultiRemoteElements, options?: Options) => Promise; /** * A number matcher of `$()`, `$$()` and multi-remote elements, made from its descriptor in `elementNumberGetters`: a number * (`toHaveWidth` is `getSize('width')`), compared with a `NumberMatcher`, or a size (`getSize()`), with a `NumberMatcher` * in each field and deep equality. The expected value is checked first: a wrong one throws, also with `.not`. */ export declare const elementNumberGetterMatcher: (name: keyof typeof elementNumberGetters) => (this: WdioMatcherContext, received: MaybeSomeWdioElementOrArrayMaybePromiseOrMultiRemoteElements, expectedValue: unknown, options?: CommandOptions) => Promise; export {};