javascript - 我可以将 Excel 工作表中的数据导入到 Instruments UIAutomation 中吗?

标签 javascript instruments ios-ui-automation import-from-excel xcode-instruments

我想为有两个字段的屏幕编写脚本,我只想测试这些字段的值的不同可能性,是否会导航到进一步的屏幕。但输入这些字段的数据组合太大。那么我可以从 Excel/已存储我的数据的任何其他文件导入数据吗?

最佳答案

是的,这是可能的。您可以获取在 bash 脚本中能够获取的所有数据。编写一个脚本文件,将所需信息打印到标准输出。例如

#!/bin/bash
cat myfile

您可以从 UIAutomation 运行此 bash 脚本并使用此命令获取其输出

var result = target.host().performTaskWithPathArgumentsTimeout(full_path_to_your_script, [""], 10);

现在您可以使用 bash 脚本的输出:

element.setValue(result.stdout);

请引用 fabe 的回答,https://stackoverflow.com/a/19016573/344798

引用https://stackoverflow.com/a/20626488/344798

关于javascript - 我可以将 Excel 工作表中的数据导入到 Instruments UIAutomation 中吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14454842/

相关文章:

xcode - Instruments 4.1 对从 Xcode 4.1 启动的项目没有响应,直到按下 Cmd-Tab

ios-ui-automation - 在 UIAutomation javascript 中链接 #imports

ios - UIAutomation 无法点击按键

javascript - Nodejs Mocha : Unable to test a POST and GET by ID

javascript - Ember.js 有任何附加组件来路由请求吗?

javascript - 使用回调 url 创建 facebook 应用程序

iOS - 内存警告后应用程序崩溃 - 仪器显示没有泄漏

javascript - json将单引号解析为javascript

ios - 为什么我在 UI 自动化工具中看到 "An error occurred while trying to run the script."?

javascript - 使用名称识别 UIAutomation 中的单元格