2017-11-03 3 views
0

Ich brauche Hilfe bei der Robot Framework-Syntax. Die erste Verwendung des Schlüsselworts Log My List ist in Ordnung, protokolliert die Liste perfekt. Zweite Nutzung, in if-Anweisung hält mich zu sagen:Robot Framework: Wie kann ich eine Liste an ein Schlüsselwort in einer if-Anweisung übergeben?

Wert des Variable '@ {MyList}' Liste oder Listen wie nicht

Weiß jemand, was das Problem ist?

*** Settings *** 
Documentation Problematic Suite 

*** Variables *** 
${condition} 0 

*** Keywords *** 
Log My List ${MyList} 
    Log Many @{MyList} 

*** Test Cases *** 
LD_0: Pass List in If Statement. 
    [Documentation] Problem example. 
    [Tags] Problem 
    @{LIST}= Create List item1 item2 item3 
    Log My List ${LIST} 
    Run Keyword If ${condition} == 0 Log My List ${LIST} 

Antwort

1

Dies scheint ein Fehler im Roboter zu sein. Wenn Sie von eingebetteten Argumenten zu traditionellen Argumenten wechseln, funktioniert es.

*** Settings *** 
Documentation Problematic Suite 

*** Variables *** 
${condition} 0 

*** Keywords *** 
Log My List 
    [Arguments] ${MyList} 
    Log Many @{MyList} 

*** Test Cases *** 
LD_0: Pass List in If Statement. 
    [Documentation] Problem example. 
    [Tags] Problem 
    @{LIST}= Create List item1 item2 item3 
    Log My List ${LIST} 
    Run Keyword If ${condition} == 0 Log My List ${LIST} 
Verwandte Themen