Skip to content

Crazy blog

No money, no honey, no funny…


Today, I have the problem when assign value for a variable in using robotframework. It takes me 6 hours to investigate. And I see the problem that I just use variable on the normal way:Set Variable. So that the problems happen that I assign value but it always return empty.

Here is the example to solve that problem. It is just set the ${MyVariable} with value 100 from Resource Temp.html. Then write it to file.
In testcase, using Set Global Variable ${MyVariable} 10 (default value)

In Resource Temp.html, just call Set Global Variable ${MyVariable} 100 (new value)

Then just run the script and view the file ${file}. The result will be 100. đŸ™‚
Advertisements

Tags: ,

%d bloggers like this: