How to send data from one robot file to other robot file

i have below code example code using gherkin methods , in robot framework:

*** Settings***
Given data sending example
      ...  name|age|number
      ...  kumar|28| 1234
Then xxx

data sending example is need to receive same format data . can any one please guide me archive this task

thanks in advance

Hi @mvkumaraswami ,

A really simple example would be:

  • robot 1 does something, collects the data and writes the data to a local text file
  • robot 2 reads the data from the local text file, the does something else

A more complex version might

  • involve using an excel file
  • involve a shared network drive and each robot running of different computers
  • involve robot 1 uploading the file and robot 2 downloading the file
  • involve robot 1 posting the data using an API to a data store and robot 2 on a different machine in another network retrieving the data from that data store

All these things are possible with Robot Framework, so really it depends what you want to do.

Sticking with the simplest example OperatingSystem Library’s Create File and Get File are what you’d be after.

Also behavior-driven style is probably worth a read if you need to build tests in that style, I don’t really use that style but it is supported, from my understanding you would need to create a keyword called data sending example that would take the input data and save it to a variable like ${filedata}' Then instead of xxx` you’d probably want something like

Then write data to file    c:/some/path/my.example.file.txt

for which you’s need another keyword that took ‘${filename}’ as it’s argument and then inside this keyword it would do something like:

Create File    ${filename}    ${filedata}

Hope that helps,

Dave.