简体   繁体   中英

How To calculate the average value in Robot Framework

I want to calculate the average values as following .

${var1}= 10
${var2}= 50
${var3}= 10
${var4}= 30
${var5}= 50

Executed average is 30

How should writing syntax used?

Use Evaluate from BuiltIn library

${Average}=     Evaluate       (${var1}+${var2}+${var3}+${var4}+${var5})/5

Output -

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM