当我尝试通过运行"npx wdio config“将"Hello World”测试套件设置到我的项目中时,我得到了以下错误。我按照https://webdriver.io/docs/gettingstarted上的说明操作,但还是不能正常工作。
有人能帮我解决这个问题吗:
WDIO Configuration Helper
? Where is your automation backend located? (Use arrow keys)
❯ On my local machine
In the cloud using Experitest
In the cloud using Sauce Labs
In the cloud using Browserstack or Testingbot or LambdaTest or a different service
I have my own Selenium cloud (node:2831) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'find' of undefined
at Object.run (/Users/gustavosuarez/web/mo-appium-wdio-jasmine/node_modules/@wdio/cli/build/index.js:67:19)
at Object.<anonymous> (/Users/gustavosuarez/web/mo-appium-wdio-jasmine/node_modules/@wdio/cli/bin/wdio.js:11:21)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47发布于 2021-05-06 15:31:33
最新版本的@wdio/cli依赖似乎有问题。我用一个旧版本解决了这个问题,现在它可以工作了("@wdio/cli": "7.3.1")。只需将依赖项添加到package.json并再次运行yarn或npm install,然后运行npx wdio config,它就应该可以工作了。
https://stackoverflow.com/questions/67410409
复制相似问题