Webdriver.io中的类型“ BrowserObject”上不存在属性“ config”

时间:2019-10-10 12:33:50

标签: testing webdriver-io

我正在使用webdirevio进行一些测试,我想按如下所述从测试中访问配置:

https://webdriver.io/docs/browserobject.html

但是当我在测试中写browser.config时,标题中就会出现错误。

编辑: 根据注释的要求, wdio版本为5.12.4 。 我正在使用Cucumber.js,因此我将console.log(browser.config)放在了步骤中,但是即使IDE(Webstorm)也无法识别它enter image description here 如果我继续运行测试,我会在日志中得到错误

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'.

1 个答案:

答案 0 :(得分:2)

这是webdriver.io中的问题。
它已在提交https://github.com/webdriverio/webdriverio/commit/29690864b30efd163c1c82bc28ac124d7948e519

中修复

修复将在v5.15.6中出现