空手道:无法切换驱动器和执行.bat文件

发布于 2025-01-30 14:50:36 字数 593 浏览 1 评论 0原文

我已经将空手道用于API,性能,UI与机器人和现在尝试CLI选项。

在脚本时,我遇到了以下情况,需要空手道专家的建议很少,

我使用ankarate.fork导航到我的机器上的其他驱动器,并尝试为特定的应用程序执行选择.bat文件,而该执行情况无法按预期工作。

以下是我使用的示例外观,

* def command =
"""
function(line) {
  var proc = karate.fork({ redirectErrorStream: false, useShell: true, line: line });
  proc.waitSync();
  karate.set('sysOut', proc.sysOut);
  karate.set('exitCode', proc.exitCode);
}
"""
* command('cd C:/Users/testdata/exe.bat')
* command('Sender -i UXPRUN)
* command('accept NO9434')

我必须打开特定的.bat文件并启动它,然后发送Accept命令。

如果这是错误的方法,您能否提出一种实现这一目标的方法

I have used karate for API, performance, UI with robot and now trying cli options.

while scripting i came across the below scenario and need few suggestion from experts of karate

I used karate.fork to navigate to different drive on my machine and tried to select a .bat file for particular app execution which didn't work as expected.

below is the sample look alike which i have used

* def command =
"""
function(line) {
  var proc = karate.fork({ redirectErrorStream: false, useShell: true, line: line });
  proc.waitSync();
  karate.set('sysOut', proc.sysOut);
  karate.set('exitCode', proc.exitCode);
}
"""
* command('cd C:/Users/testdata/exe.bat')
* command('Sender -i UXPRUN)
* command('accept NO9434')

I have to open particular .bat file and start it then send the accept command.

if this is wrong approach, could you suggest a way to achieve this

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文