[ASK] How to selecting dynamic file in upload dialog?

Ranorex Spy, Recorder, and Studio.
radiaku
Posts: 2
Joined: Wed Apr 10, 2013 10:52 am

[ASK] How to selecting dynamic file in upload dialog?

Post by radiaku » Wed Apr 10, 2013 11:07 am

Hi,

How to selecting dinamic file in file upload dialog?

CASE:
I want select 40 file inside folder with different ( different name ). I want repeating this action with another 40 file.

Any hand?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3917
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: [ASK] How to selecting dynamic file in upload dialog?

Post by odklizec » Wed Apr 10, 2013 12:01 pm

Hi,

The easiest way (no scripting required) is to use the excel/csv file filled with individual paths. But this approach is only good in case the batch of files does not change during the time. In other words, you have the same batch of files you want to repeatedly test with each new AUT version. Eventually, if you can prepare new excel/csv before running new test.

Just create an excel/csv file with just one column, where each row contains one path. Column header set with something like "File Paths" or anything else you want. Now connect the excel/csv column "File Paths" to a variable. Then use this variable in "Set Value" action, where the content of the variable is passed to the File Open input field.

For a more detailed explanation how to do everything I described above, check this data-driven automation video...
http://www.youtube.com/watch?v=TRQy2Jl79-U

In case you want to dynamically read the content of a particular folder and then load individual files, you will have to use an advanced technique, requiring some serious scripting and good knowledge of C#/VB .NET. I'm sorry, I can't help here.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

radiaku
Posts: 2
Joined: Wed Apr 10, 2013 10:52 am

Re: [ASK] How to selecting dynamic file in upload dialog?

Post by radiaku » Wed Apr 10, 2013 9:46 pm

@odklizec

Thanks you for the video. I got some ideas.
So I created program to get all filename and put that in csvfile and after that let the ranorex handle the rest :D.\

Thanks