属性 'config' 在 Webdriver.io 中的类型 'BrowserObject' 上不存在
Property 'config' does not exist on type 'BrowserObject' in Webdriver.io
我正在使用 webdirevio 进行一些测试,我想按照此处所述从测试访问配置:
https://webdriver.io/docs/browserobject.html
但是当我在测试中写 browser.config
时,我得到了标题中的错误。
编辑:
根据评论中的要求,wdio 版本为 5.12.4。
我正在使用 cucumber.js 所以我在我的步骤中放了 console.log(browser.config)
但即使是 IDE (Webstorm) 也无法识别它
如果我继续 运行 测试,我会在日志中收到错误
ERROR @wdio/runner: TSError: ⨯ Unable to compile TypeScript:
tests/features/step_definitions/steps.ts(84,25): error TS2339: Property 'config' does not exist on type 'BrowserObject'.
这是 webdriver.io 中的一个问题。
它已在提交 https://github.com/webdriverio/webdriverio/commit/29690864b30efd163c1c82bc28ac124d7948e519
中修复
修复将出现在 v5.15.6
我正在使用 webdirevio 进行一些测试,我想按照此处所述从测试访问配置:
https://webdriver.io/docs/browserobject.html
但是当我在测试中写 browser.config
时,我得到了标题中的错误。
编辑:
根据评论中的要求,wdio 版本为 5.12.4。
我正在使用 cucumber.js 所以我在我的步骤中放了 console.log(browser.config)
但即使是 IDE (Webstorm) 也无法识别它
ERROR @wdio/runner: TSError: ⨯ Unable to compile TypeScript:
tests/features/step_definitions/steps.ts(84,25): error TS2339: Property 'config' does not exist on type 'BrowserObject'.
这是 webdriver.io 中的一个问题。
它已在提交 https://github.com/webdriverio/webdriverio/commit/29690864b30efd163c1c82bc28ac124d7948e519
修复将出现在 v5.15.6