0
如何將參數放置在測試步驟描述的中間?機器人框架中的參數語法小黃瓜風格
當我創建這樣一切工序進行OK(參數是在步驟結束):
*** Test Cases ***
Scenario: Login as a valid user
When user is logged in as: user1 password1
*** Keywords ***
user is logged in as:
[Arguments] ${arg_user} ${arg_pass}
Click Link id=loginLink
Page Should Contain Use a local account to log in
Input Text id=UserName ${arg_user}
Input Text id=Password ${arg_pass}
Click Button xpath=//*[@id="loginForm"]/form/fieldset/input
如何進行*** Test Cases ***
和*** Keywords ***
樣子像這樣的步驟:
When user user1 is logged in with the following password: password1
,其中user1是第一個參數,而password1是第二個參數。
謝謝@Bryan奧克利! – LeeWay 2014-09-01 11:35:50