I am looking to validate certain fields in a csv file. Do I need to import the csv file as a data binding to do this? Another issue, the file is created by the software and will have a different name for each run.
Thanks,
Stephanie
Validation csv file
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Validation csv file
Hi Stephanie,
There are different approaches how to validate the data of a csv file.
Since Ranorex is based on the .Net framework you could simply use the .Net methods to read the data of a csv file as explained here: Reading and Writing CSV Files in C#. After you read the data you can validate them by using a Ranorex Validate method.
Since Ranorex is basically a GUI testing tool you could also open the csv file in an editor and then track the elements using Ranorex Spy respectively search for the text elements using one of the Ranorex Find methods.
You could also use the data source but this is not the best approach in case the source file changes very often.
Do you know which name will be used by your software to name the csv file in advance?
Regards,
Markus
There are different approaches how to validate the data of a csv file.
Since Ranorex is based on the .Net framework you could simply use the .Net methods to read the data of a csv file as explained here: Reading and Writing CSV Files in C#. After you read the data you can validate them by using a Ranorex Validate method.
Since Ranorex is basically a GUI testing tool you could also open the csv file in an editor and then track the elements using Ranorex Spy respectively search for the text elements using one of the Ranorex Find methods.
You could also use the data source but this is not the best approach in case the source file changes very often.
Do you know which name will be used by your software to name the csv file in advance?
Regards,
Markus