[๐ Bug]: `Cannot find name 'browser'.ts(2304)` and `Namespace 'global.WebdriverIO' has no exported member 'Element'.ts(2694)`
See original GitHub issueHave you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
latest
Node.js Version
v14.15.1
Mode
WDIO Testrunner
Which capabilities are you using?
No response
What happened?
I just created a default project with latest everything choosing TypeScript and Cucumber. Tests pass, but when I go to the pageobjects fijes I get the following errors:
Namespace 'global.WebdriverIO' has no exported member 'Element' .ts(2694)
Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`.ts(2581)
Cannot find name 'browser'.ts(2304)
What is your expected behavior?
This errors should not be popping.
How to reproduce the bug.
- Create npm project (
npm init -y) - Create wdio project (
npm init wdio)- Selected typescript and cucumber
- Run automatically generated tests -> pass
- Go to see pageobjects at
features/pageobjects - See TS errors raise with
WebdriverIO.Elementand,browserand$objects:
Namespace 'global.WebdriverIO' has no exported member 'Element' .ts(2694)
Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`.ts(2581)
Cannot find name 'browser'.ts(2304)
Relevant log output
Namespace 'global.WebdriverIO' has no exported member 'Element' .ts(2694)
Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`.ts(2581)
Cannot find name 'browser'.ts(2304)
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
### Is there an existing issue for this?
- [X] I have searched the existing issues
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
webdriverio/webdriverio - Gitter
ts:830:41 - error TS2694: Namespace 'WebDriver' has no exported member 'BaseClient'. 830 interface Browser extends WebDriver.BaseClient { Found 1 error.
Read more >e2e tsconfig types not found: error TS2304: Cannot find name ...
I'm trying to setup an example angular project using a simple webdrioverio e2e test, but run into some compilation errors for my e2e...
Read more >TypeScript Setup - WebdriverIO
You can write tests using TypeScript to get auto-completion and type safety. You will need typescript and ts-node installed as devDependencies , via:....
Read more >webdriverio@8.0.13 - jsDocs.io
A method to create a new session with WebdriverIO. NOTE: If you hit "error TS2694: Namespace 'global.WebdriverIO' has no exported member 'ย ...
Read more >WebdriverIO 7 Rewritten in Typescript, Released with ... - InfoQ
The browser and mobile automation test framework WebdriverIO recently released a major update. Webdriver IO 7 is now written with TypeScriptย ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Already fixed it. Apparently the installer sent my
tsconfigand mywdio.confas well inside a/test/directory. Never happened to me before. Easy fix though.~same here ๐~ works using Node 16 and the following tsconfig.json setting:
๐๐ป