Reputation: 1214
I am using robot framework for web automation and I am wondering how to set up a properties files such as config.properties in Java in order to set different assertions for example depending on the language used.
For example :
Let's say I would like to assert a title of a page.
Location Should be Title in English
Location Should be Title in French
Location Should be Title in Italian
Is there a way to use only one assertion in my test case and use a different file that will do the corresponding assertion depending on the language of the website : website.com, website.fr, website.it ?
Thanks
Upvotes: 2
Views: 922
Reputation: 1214
After some research I have found out that robot framework offers the possibility of doing this through variables files. Variable files are python module where I can simply set variables for each website version : EN,FR,IT Example of varfilefr :
TITLE = "title in french"
In my tests case I would use
${TITLE}
Then in command line I enter the variable files as parameter, all variables set in variable file will be taken in account when running the test.
pybot -vbrowser:firefox -vbaseurl:FRURL --variablefile frvariablefile.py test.robot
Upvotes: 1