jeudi 23 juillet 2020

How to read a variable in the robot framework with a "#" in front of it

I am trying to create a random color generation in the robot framework. This is my code:

''' Random Color ${color_hex}= Generate Random String 6 [NUMBERS]ABCDEF ${color_rand}= Catentate SEPARATOR= # ${color_hex} '''

When I try to use ${color_rand} as an argument it does not work. The framework reads it as a comment instead of a string. I specifically need a "#" before 6 hex values for my color picker to work. If I use a backslash() to escape and make it a string (i.e. ${color_rand}) it reads the value, "${color_rand}" vs what I want which is, "#123CDE". I don't know what to do for the framework to read the string, WITH the #, and not have it be a comment.




Aucun commentaire:

Enregistrer un commentaire