Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Robotframework for循环值的每次迭代都应在for循环外求和_Robotframework - Fatal编程技术网

Robotframework for循环值的每次迭代都应在for循环外求和

Robotframework for循环值的每次迭代都应在for循环外求和,robotframework,Robotframework,我只是在robot框架中尝试下面的场景 For循环将运行2次。每次它都会在变量x中存储一个值 假设第一次运行时,它存储了x=5,第二次运行时存储了x=2。 现在我想求外循环中x的和 For {i} IN RANGE 0 2 ${x}= Get Element Count //tbody/tr LOG ${x} Click Element //tbody/tr` END 这两个迭代都成功了,现在我想在外部循环中求X的和,不要使用int类型来存储,而是使用一个列表;每次迭

我只是在robot框架中尝试下面的场景 For循环将运行2次。每次它都会在变量x中存储一个值 假设第一次运行时,它存储了x=5,第二次运行时存储了x=2。 现在我想求外循环中x的和

For {i} IN RANGE 0    2
${x}=    Get Element Count    //tbody/tr
LOG  ${x}
Click Element    //tbody/tr`
END

这两个迭代都成功了,现在我想在外部循环中求X的和,不要使用int类型来存储,而是使用一个列表;每次迭代的结果都会附加到列表中,最后可以对列表成员求和。
For {i} IN RANGE 0    2
${x}=    Get Element Count    //tbody/tr
LOG  ${x}
Click Element    //tbody/tr`
END
样本: