Validation csv file

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 5
Joined: Tue Apr 22, 2014 10:45 pm

Validation csv file

Post by smrse » Mon Jun 23, 2014 6:47 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11830
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Validation csv file

Post by Support Team » Wed Jun 25, 2014 12:54 pm

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?