可以在Selenium中用嵌套变量计算表达式吗?示例:
store | 2 | scenario
store | $10 | data${scenario}Cost所以data2Cost = $10
store | ${data{$scenario}Cost} | ${scenario}Result
echo | ${scenario}Result |它返回2Result = ${data2Cost}而不是2Result = $10。
发布于 2015-07-14 18:11:14
您可以使用storeEval将求值表达式存储到教程帮助我实现的变量中。
|store | 2 | scenario |
|store | $10 | data${scenario}Cost |
|storeEval | storedVars['data${scenario}Cost'] | ${scenario}Result |
|storeEval | storedVars['${scenario}Result'] | MainResult |
|echo | ${MainResult} |

https://stackoverflow.com/questions/31412961
复制相似问题