samedi 5 septembre 2020

How do I skip some optional arguments in Robot Framework?

My intend is to skip the ${num2} and ${num4} arguments.
But I got an error saying: "Positional argument cannot be used after named arguments"
I don't know why it considers the list as a positional argument, shouldn't it be a variable one?

*** Test Cases ***  
Test  
    @{daysOff}=    Create List    Tuesday    Friday  
    Keyword    30    num3=6    ${daysOff}  
  
*** Keywords ***  
Keyword  
    [Arguments]    ${num1}    ${num2}=5    ${num3}=10    ${num4}=15    @{list}  
    Log    ${num1}  
    Log    ${num2}  
    Log    ${num3}  
    Log    ${num4}  
    Log    ${list}[0]  
    Log    ${list}[1]

Aucun commentaire:

Enregistrer un commentaire