You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Testrigor中使用AI生成功能调用存储值时报错求助

提取6位数字OTP的问题解决

问题说明

已将目标内容存储至variableName变量,尝试执行以下命令时触发错误:

extract text from stored value "variableName" matching regex pattern "\b\d{6}\b" and save it as "otp"

错误提示:AI无法为'extract text from stored value "variableName" matching regex pattern "\b\d{6}\b" and save it as "otp"'生成步骤。

可行实现方案

放弃依赖AI生成步骤,手动通过工具原生功能实现提取逻辑:

以Power Automate为例

  • 添加「匹配正则表达式」动作
  • 在「输入」字段选择已存储的variableName变量
  • 在「正则表达式」字段填入\b\d{6}\b
  • 将动作输出的匹配结果赋值给otp变量

以UiPath为例

  • 添加「Matches」活动
  • 设置Input属性为variableName变量
  • 设置Pattern属性为\b\d{6}\b
  • 若确认内容中仅存在一个6位数字OTP,可通过Matches(0).Value将结果赋值给otp变量

通用逻辑说明

核心是调用工具的正则匹配能力,传入存储变量的内容和目标正则表达式,再将匹配结果存入指定变量,无需依赖AI生成步骤的封装命令。

内容的提问来源于stack exchange,提问作者Baala

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 06:05:03