如果我将字符串传递${varName}给内置关键字Log to Console,控制台将输出文字字符串${varName}。如果有一个命名的变量varName具有的价值test123,我怎么关键字Log to Console输出的变量值test123,当我通过${varName}?我正在从 Excel 电子表格制作数据驱动的脚本。在我传入的字符串值中,我想用变量的值替换其中的变量名称。我试图通过Evaluate关键字运行字符串,但它只是改变了所有变量名,比如${varName}to RF_VAR_varName,所以它在这里识别出一些东西?Open Excel ${ExcelFile}
${varName} Read Cell Data By Coordinates ${Sheet_Name} 0 ${RowNum}
set global variable ${varName}
log varName: ${varName} console=yes将输出到控制台: '38773461|${TMS_ConfNo}|substr:RDSJUMHV FIRSTNAME|${globalLastName} FIRSTNAME|fullline:JEYCTINY, FIRSTNAME|${globalLastName1}, FIRSTNAME|fullline:RDSJUMHV, FIRSTNAME|${globalLastName}, FIRSTNAME|fullline'我想要这个字符串: '38773461|${TMS_ConfNo}|substr:RDSJUMHV FIRSTNAME|${globalLastName} FIRSTNAME|fullline:JEYCTINY, FIRSTNAME|${globalLastName1}, FIRSTNAME|fullline:RDSJUMHV, FIRSTNAME|${globalLastName}, FIRSTNAME|fullline'对此进行评估: '38773461|12345678|substr:RDSJUMHV FIRSTNAME|LASTNAME FIRSTNAME|fullline:JEYCTINY, FIRSTNAME|LASTNAME1, FIRSTNAME|fullline:RDSJUMHV, FIRSTNAME|LASTNAME, FIRSTNAME|fullline'我希望字符串中的所有变量都转换为它们各自的值。
添加回答
举报
0/150
提交
取消