空手道 UI 自动化 "key" 未定义

Karate UI automation "key" is not defined

我正在使用带 chrome 驱动程序的空手道 1.1.0。 我正在尝试使用以下文档中提供的特殊键将 TAB 键发送到我们的 ReactJs 应用程序中的文本框。

https://github.com/intuit/karate/tree/master/karate-core#special-keys 我看到以下错误消息。我的设置中缺少什么。

java.lang.AssertionError: js failed:
>>>>
01: input('body', key.TAB)
<<<<
org.graalvm.polyglot.PolyglotException: ReferenceError: "key" is not defined
- <js>.:program(Unnamed:1)

classpath:com/mani/sandbox/ui/01.feature:28

你打错了。 K 是大写。

尝试:

* input('body', Key.TAB)