diff --git a/src/matchers/element/toHaveElementProperty.ts b/src/matchers/element/toHaveElementProperty.ts index e5e8ae5f..ecddf75f 100644 --- a/src/matchers/element/toHaveElementProperty.ts +++ b/src/matchers/element/toHaveElementProperty.ts @@ -34,10 +34,10 @@ async function condition( return compareText(prop, value as string | RegExp | ExpectWebdriverIO.PartialMatcher, options) } -export async function toHaveElementProperty( +export async function toHaveElementProperty( received: WdioElementMaybePromise, property: string, - value?: string | RegExp | ExpectWebdriverIO.PartialMatcher, + value?: T, options: ExpectWebdriverIO.StringOptions = DEFAULT_OPTIONS ) { const isNot = this.isNot diff --git a/src/matchers/element/toHaveValue.ts b/src/matchers/element/toHaveValue.ts index e11664bd..4844e1db 100644 --- a/src/matchers/element/toHaveValue.ts +++ b/src/matchers/element/toHaveValue.ts @@ -2,9 +2,9 @@ import { toHaveElementProperty } from './toHaveElementProperty.js' import { DEFAULT_OPTIONS } from '../../constants.js' import type { WdioElementMaybePromise } from '../../types.js' -export function toHaveValue( +export function toHaveValue( el: WdioElementMaybePromise, - value: string | RegExp | ExpectWebdriverIO.PartialMatcher, + value: T, options: ExpectWebdriverIO.StringOptions = DEFAULT_OPTIONS ) { return toHaveElementProperty.call(this, el, 'value', value, options)