sureshvv
sureshvv

Reputation: 4422

Why is white space significant in test scripts?

I found that I had to put 2 spaces instead of 1 to make testcases be interpreted correctly, for eg:

Set Selenium Timeout<2 spaces>60

This is very unintuitive. Is this by design?

Upvotes: 2

Views: 372

Answers (1)

Laurent Bristiel
Laurent Bristiel

Reputation: 6935

yes, this is by design. The idea is that when you write test cases in Robot Framework, they can be read as "specifications" or "plain english" as much as possible. So it is possible to have spaces in keywords so you can name them like "log file should be in directory" or "status code from http server should be" and to distinguish those keywords from the argument you need to have more than one space (hence the "minimum 2").

Upvotes: 2

Related Questions