1

I'm using robotframewok 4.0

I have defined a simple list variable:

*** Variables ***
${BROWSERSIZE}   1400   900

Using this variable in a test case:

Log To Console    Size: ${BROWSERSIZE}, Width:${BROWSERSIZE}[0] Height:${BROWSERSIZE}[1]

the output is this:

Size: 1400 900, Width:1 Height:4

Shouldn't (according to the manual) the indexes [0] and [1] refer to the two values? Instead it seems they refer to the character...

What am I doing wrong?

1 Answer 1

2

You are declaring your variable as a scalar instead of as a list. When you indexing it, you are indexing a string,[0] is the first character 1, [1] is the second character 4.

Change $ to @ to declare the variable as list.

*** Variables ***
@{BROWSERSIZE}   1400   900
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.