jeudi 27 décembre 2018

How to assign value to a variable depending on IF/ELSE condition in Robot?

I am trying to assign a variable the return value of the Keyword (Get Ipsec Pkt Stat) if a condition is true. The following is the syntax I am using, however my variable ${ipsec_stats} gets assigned None, even though the condition is being satisfied:

Run Keyword If    '${chassis_cluster}' == 'True'
...    ${ipsec_stat} =  Get Ipsec Pkt Stats   ${R0}     node=local
...    ELSE
...    ${ipsec_stat} =  Get Ipsec Pkt Stats   ${R0} 
[Return]    ${ipsec_stat}

Aucun commentaire:

Enregistrer un commentaire