There’s a couple of ways you can do this, but first I’ll remind you that pipes (|) are a special charecter in robot framework, so you’ll need to escape them.
First way is covered in the variable section of the user guide under Creating scalar variables. it would look something like:
*** Variables ***
${xyz} SEPARATOR=\n
... Name \| Title \| Description
... Jagan \| Developer \| Developer Job
That great if you can define the variable before the test, which brings me to;
The second way, you might have also have in escaping, that you can use \n for a new line, so combining this with Set Variable, will give you:
*** Test Cases ***
Jagans test
${xyz}= Set Variable Name \| Title \| Description\nJagans Bhaji \| Tester \| Test Team
But it might become a bit unwieldy if you have more than 5 lines of data, so when using this method it might be more readable (though also a bit slower) if you do it like this:
*** Test Cases ***
Jagans test
${xyz}= Set Variable Name \| Title \| Description
${xyz}= Set Variable ${xyz}\nJagans mate \| Guru \| Temple
Thanks Dave for response,
In my scenario, I should not use any variables to keyword directly, I need to send the data to keyword directly.
Generated report shows the sending data in same line of keyword, I want to see the data in next line of keyword, can you help me with that. I found all the ways it didn’t worked(tried with \n etc)
*** Settings ***
*** Variables ***
${xyz} SEPARATOR=\n
... Name \| Title \| Description
... Jagan \| Developer \| Developer Job
*** Test Cases ***
Jagans test
Log ${xyz}
${xyz}= Set Variable Name \| Title \| Description\nJagans Bhaji \| Tester \| Test Team
Log ${xyz}
${xyz}= Set Variable Name \| Title \| Description
${xyz}= Set Variable ${xyz}\nJagans mate \| Guru \| Temple
Log ${xyz}
When talking about code I am passing pipe separated data in 2 lines, it should accept as 2 arguments, but it is taking as multiple arguments because of space between the data, I want to avoid that each line should consider as a single argument
When talking about report, The report shows the given data in same keyword display line, I want to see the data in new line, as same format how I give in Code
Please check and let me know
I want to see the report as below fig2, which I am not able to do and format as how we given in code, help me generate in same way