QA Automation/Robot Framework
Variables, Lists And Dictionaries
kokorii_
2024. 5. 6. 17:48
3 type of Variables
- simple variable ${my_var}
- List @{LIST} index0 index1 index2 index3
- Dictionary. &{DICTIONARY}
*** Settings ***
Documentation This is my first test case
Library OperatingSystem
Library Collections
*** Keywords ***
*** Variables ***
${my_var} my test variable
${second_var} this is second
@{List} test1 test2 test3 test4
&{DICTIONARY} username=testUser password=qwerty123!
*** Test Cases ***
TEST
[Tags] Demo
Log This is my first test case
Log ${my_var}
Log ${second_var}
Log ${List}[1]
Log ${List}[0]
Log ${List}[3]
Log ${DICTIONARY}[username]
Log ${DICTIONARY}[password]
* CMD+ D로 현재 커서가 있는 줄 복사 가능!
* @,$로 출력하는 방식은 Deprecated 되었음. 사용시 반드시 $표시로 사용할 것