UNPKG

webdriverio

Version:

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

26 lines • 1.06 kB
import type { Selector } from '../types.js'; /** * Error thrown when `$` is used in strict mode (the default as of v10) and the * given selector resolves to more than one element. * * This lives in its own leaf module (no runtime imports beyond the `Selector` * type) so that other leaf utilities - notably `implicitWait.ts` - can check * `instanceof StrictSelectorError` without pulling in `strictMode.ts`'s * `findStrictElement`, which imports the whole `utils/index.ts` barrel and, * transitively through the command barrels and `middlewares.ts`, closes a * circular import back onto `refetchElement.ts`/`implicitWait.ts` themselves. * * @see https://github.com/webdriverio/webdriverio/issues/15666 */ export declare class StrictSelectorError extends Error { /** * amount of elements the selector resolved to */ matches: number; /** * selector that was used to query the elements */ selector: Selector; constructor(selector: Selector, matches: number); } //# sourceMappingURL=strictSelectorError.d.ts.map