[英]Get Type in Robot Framework
你能告诉我如何在Robot Framework中获取变量类型吗?
${ABC} Set Variable Test
${XYZ} Set Variable 1233
备注:获取变量Type,如string,int
获取$ {ABC} type = string
获取$ {XYZ} type = int
这是我使用的:
${type} = Evaluate type($temp).__name__
注意:最好使用全局字符串/ int / float / list / dict / ...进行比较,而不是硬编码类型值,因为它们可能因构建而异。
你可以这样做: ${type_ABC} Evaluate type($ABC)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.