gpt4 book ai didi

javascript - Testcafe Applitools typescript - 错误 : Property 'accessibilityValidation' is missing in type

转载 作者:行者123 更新时间:2023-12-03 07:38:11 26 4
gpt4 key购买 nike

我正在尝试执行此处找到的测试脚本 https://www.npmjs.com/package/@applitools/eyes-testcafe
但是我收到关于 typescript 转换的错误。
如果保存为 .js,则脚本会成功运行。

test/specs/applitoolsExample.ts:10:19 - error TS2345: Argument of type '{ appName: string; testName: string; browser: { width: number; height: number; name: "firefox"; }[]; t: TestController; }' is not assignable to parameter of type 'OpenOptions'.
Property 'accessibilityValidation' is missing in type '{ appName: string; testName: string; browser: { width: number; height: number; name: "firefox"; }[]; t: TestController; }' but required in type 'OpenOptions'.

10 await eyes.open({
~
11 appName: "Hello World!",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
14 t,
~~~~~~
15 });
~~~

node_modules/@applitools/eyes-testcafe/ts/eyes.ts:8:9
8 accessibilityValidation: AccessibilitySettings
~~~~~~~~~~~~~~~~~~~~~~~
'accessibilityValidation' is declared here.


Found 1 error.
我是 js、ts 和 testcafe 的新手,所以请不要假设。谁能建议如何使用 typescript 使 Applitools 在 testcafe 中工作?

最佳答案

看起来像 @applitools/eyes-testcafe 附带的 TypeScript 定义模块不正确。
更改test/specs/applitoolsExample.ts文件扩展名为 .js或在 applitools/eyes-testcafe 中写下有关此问题的问题存储库。
另外,你可以找到很多例子here .

关于javascript - Testcafe Applitools typescript - 错误 : Property 'accessibilityValidation' is missing in type,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64969368/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com