“Run Keyword If” and setting a variable

前端 未结 2 1204
不思量自难忘°
不思量自难忘° 2021-01-06 02:57

The following code doesn\'t work. I want to set a variable if a condition is true.

    Run Keyword If    ${MAC} == 110299160221421    ${device_serial}=    se         


        
2条回答
  •  天涯浪人
    2021-01-06 03:32

    It worked with this code:

    *** Test Cases ***
    Run Keyword If    ${MAC} == 110299160221421    myKeyword    
    
    *** Keywords ***
    myKeyword
        ${device_serial}=    set variable    ${device_serial_1}
    

提交回复
热议问题