samedi 5 septembre 2020

Is there a way to set variables inside an If condition in Robot Framework?

I've tried this to increment the variable after, but it didn't work

Run Keyword If    '${state}'=='True'    Run Keywords    Click Element 
   xpath=//button[@overflow]  
...    AND Click Element    css=#stack  
...    ${i} Set Variable    1  
...    AND FOR ${item} IN ${items}  
            Log    ${item}
            Log    ${i}
            ${i}    Set Variable    ${i} + 1
           END

Aucun commentaire:

Enregistrer un commentaire