Skip to content

Commit 9a369c4

Browse files
docs: add note about including dom types in WTL (#867)
1 parent 4170dbc commit 9a369c4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/webdriverio-testing-library/intro.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,18 @@ declare global {
156156
}
157157
```
158158

159+
If you are finding an error similar to this:
160+
161+
```typescript
162+
browser.getByRole('navigation')
163+
// "Argument of type '"navigation"' is not assignable to parameter of type 'ByRoleOptions | undefined'."
164+
```
165+
166+
you need to include "DOM" in the
167+
[lib](https://www.typescriptlang.org/tsconfig#lib) option of your tsconfig. See
168+
[here](https://github.com/testing-library/webdriverio-testing-library/issues/22)
169+
for more information.
170+
159171
Additional information about using typescript with WebdriverIO can be found
160172
[here](https://webdriver.io/docs/typescript/)
161173

0 commit comments

Comments
 (0)