问题
Could you tell me about how to get the variable type in Robot Framework.
${ABC} Set Variable Test
${XYZ} Set Variable 1233
Remark: Get the variable Type such as string, int
get ${ABC} type = string
get ${XYZ} type = int
回答1:
This is what I use:
${type} = Evaluate type($temp).__name__
Note: it's good to have global string/int/float/list/dict/... examples for comparison than hard-coding the type values as they might differ depending on build.
回答2:
You can do e.g. this:
${type_ABC} Evaluate type($ABC)
来源:https://stackoverflow.com/questions/42617970/get-type-in-robot-framework