load file names from list

Ranorex Spy, Recorder, and Studio.
redrodan
Posts: 1
Joined: Mon Nov 23, 2009 11:46 pm

load file names from list

Post by redrodan » Mon Nov 23, 2009 11:57 pm

Basic test I’m trying while evaluating Ranorex Studio

1)Open our WPF application

2)Load image from list (list can be up to 100 items long and recording one by one would take way too long)

3)Wait for image to process by detecting if Our_application.exe is CPU idle (rather than using delay function)

4) Compare results of image process

5) repeat 2-4 until all images are processed.

I’m having problems with loading images from a list. I looked at the “Data Driven Testing” user guide but I had trouble with “CSVConnector”. I wasn’t sure if that was the best way to get all the image file names or I was not sure how to use “CSVConnector”.

Can someone possible point me in the right direction or example? (VBNET might be the easiest for me to understand)

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: load file names from list

Post by Ciege » Tue Nov 24, 2009 11:04 pm

Do a Google search on VBNET for System.IO.StreamReader to read in the names from a CSV or text file and assign them to an array.

Once everything is read in to an array put a loop around your select code going from LBound to UBound of the array.

Pseudo code:

Code: Select all

arrayListItems = data from the CSV
for x = lbound(arrayListItems) to ubound(arrayListItems)
  select item(arrayListItems[x])
  do your verification
next x
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...