You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of WebdriverIO v7.19.0 it is possible to chain custom queries as long
as they end in `$`. See the release notes for v7.19.0 here:
https://github.com/webdriverio/webdriverio/blob/v7.19.0/CHANGELOG.md
Add chainable queries to the `Browser` and `Element`
as commands of the form `{queryName}$`, for example the chainable
version of `getByText` is `getByText$`.
Infer the types for `ChainablePromiseElement` and
`ChainablePromiseArray` from the `Browser` and `Element` types, that way
we don't need to lock in a specific version of WebdriverIO's types.
To add the types of the chainable commands to the global WebdriverIO
types users now need to add `WebdriverIOQueriesChainable` to the global
`Browser`, `Element` and `ChainablePromiseElement` interfaces.
This should not break existing behaviour or types, and the chainable
custom commands should behave the same as the existing commands if the
WebdriverIO version is less than v7.19.0.
Typescript users need to use at least v4.1 as the types now make use of
template literal strings to modify the query name to include `$` at the
end.
Bump development version of WebdriverIO packages to at least v7.19.0 and
add tests for chaining queries.
0 commit comments