Data Connector - Use the generated Datas

Experiences, small talk, and other automation gossip.
skder
Posts: 6
Joined: Fri Jan 25, 2013 3:16 pm

Data Connector - Use the generated Datas

Post by skder » Fri Jan 25, 2013 4:02 pm

hey,

I have a problem with the DataConnector. What I'm trying to do is: Generate a csv-file with datas in it. And later on, I want to use those datas ( in the same testsuit). What I try is:

1. call a sql-query with ranorex, which writes the result into a csv-file.
2. connect the generated csv-file via connector into ranorex
3. bind the columns to the variables used in ranorex

I tried to generate them in one testcase and load the file with the help of the csv-Connector in another testcase and bind the columns to the variables of that testcase: But automatic refreshing isn't working, and after a while, a message pops up: file ... has been modified by another program. do you want to reload it? and the testrun ends...

I also tried to generate and use the data in the same testcase - but the same thing happens...

Has anyone a solution for my problem? Thanks a lot in advance :)

p.s. i also tried the sql-connector for step 1. but i failed to make a connection...

skder
Posts: 6
Joined: Fri Jan 25, 2013 3:16 pm

Re: Data Connector - Use the generated Datas

Post by skder » Sat Jan 26, 2013 11:38 pm

Hey!

I solved my problem with a tiny bit of coding:

in Testcase1 (step one stayed the same): generate an csv-File filled with data

in testcase 2, i made a little code module with a csv-connector (using ranorex.core.data;) which loads the csv-File and later on I loop through the rows of csv-file and pass the value of the needed column to my record module variable. The code element used is from here:

http://www.ranorex.com/forum/csv-file-r ... t3520.html

It works good for me:)