如何使用 webdriverIO + Typescript 添加浏览器堆栈功能?

时间:2021-05-24 21:28:06

标签: typescript webdriver-io browserstack

尝试设置 WebdriverIO + Typescript + Browserstack,但是当我尝试添加如下所示的功能时,它说这些类型不可分配给类型“WebdriverIO”,不知道该怎么做。

enter image description here

这是我的 tsconfig.ts 文件:

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "strict": true,
    "esModuleInterop": true,
    "types": [
      "node",
      "node-fetch",
      "jest",
      "webdriverio/async",
      "wdio-wiremock-service"
    ]
  }
}

1 个答案:

答案 0 :(得分:0)

您可以参考 https://github.com/browserstack/browserstack-examples-webdriverio/tree/main/resources/conf 中的示例测试和配置,并使用配置来设置您的测试。