Skip to content

docs: add note about including dom types in WTL #867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/webdriverio-testing-library/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,18 @@ declare global {
}
```

If you are finding an error similar to this:

```typescript
browser.getByRole('navigation')
// "Argument of type '"navigation"' is not assignable to parameter of type 'ByRoleOptions | undefined'."
```

you need to include "DOM" in the
[lib](https://www.typescriptlang.org/tsconfig#lib) option of your tsconfig. See
[here](https://github.com/testing-library/webdriverio-testing-library/issues/22)
for more information.

Additional information about using typescript with WebdriverIO can be found
[here](https://webdriver.io/docs/typescript/)

Expand Down