// Workaround for missing '.value' property on WebdriverIO.Client> that should be of type T // Can't notify TypeScript that the property exists directly, because the interface merging feature doesn't // appear to support pattern matching in such a way that WebdriverIO.Client is extended only when T // itself extends RawResult for some U. export function getValue(client: WebdriverIO.Client>): T { return (client as any).value; } // The official type declarations for getCssProperty are completely wrong. This function matches runtime behaviour. export function getCssPropertyValue(client: WebdriverIO.Client, selector: string, cssProperty: string): string { return (client.getCssProperty(selector, cssProperty) as any).value; }