joe_2
11 years agoContributor
Edit a data storage from a keyword test?
Is it possible to have my keyword test edit my data storage cells?
I'm using an excel file with my data driven test to create records for a data grid view object.
One of the record's fields has to be unique, and I want it to be sequential, so I made a script that increments a string (a becomes b, z becomes a and adds an a to the left... etc...) and I use that to create the 'next' string for my sequential unique field.
I want to be able to keep a record of the last one created, so the next time I run that test it won't have to call the increment function repeatedly.
It seems to me that changing the value in my data storage excel file would do the trick, but I can't seem to find a way to edit the data storage from within the keyword test.
Is there a way to do this that I'm missing?
I'm using an excel file with my data driven test to create records for a data grid view object.
One of the record's fields has to be unique, and I want it to be sequential, so I made a script that increments a string (a becomes b, z becomes a and adds an a to the left... etc...) and I use that to create the 'next' string for my sequential unique field.
I want to be able to keep a record of the last one created, so the next time I run that test it won't have to call the increment function repeatedly.
It seems to me that changing the value in my data storage excel file would do the trick, but I can't seem to find a way to edit the data storage from within the keyword test.
Is there a way to do this that I'm missing?
- Hi Joseph, you could use a Project Variable to store your string rather than writing to a file.
Regards,
Phil Baird