Output variable on file

Ranorex Studio, Spy, Recorder, and Driver.
kkaehler
Posts: 9
Joined: Wed Oct 04, 2017 3:33 pm
Location: Munich, Germany

Output variable on file

Post by kkaehler » Wed Dec 13, 2017 3:01 pm

Hello,
I'm new using Ranorex and I'm automating a Web application where I write some data, save and get an ID. Getting the value of this id and reporting it on the test report is working fine, but I would like to write this ID on a file for further controlling.
Is this possible? How can I do this?

We have Ranorex Version 7.2.1 +git.92f281f3, .NET Runtime Version: 4.0.30319.42000 on Windows 7.

Thanks for your help.
Karin

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

Re: Output variable on file

Post by odklizec » Thu Dec 14, 2017 1:25 pm

Hi,

Since Ranorex is built on .Net, you can use any file writing method available in VB .Net or C#. I'm personally using Ranorex CSV DataConnector methods for writing CSV files. For an example code, check this post:
https://www.ranorex.com/forum/writing-i ... tml#p34657
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

kkaehler
Posts: 9
Joined: Wed Oct 04, 2017 3:33 pm
Location: Munich, Germany

Re: Output variable on file

Post by kkaehler » Mon Dec 18, 2017 12:34 pm

Hi,

thanks for your answer.
I hoped it could be possible using Data Binding or something like this, because I'm not familiar with user code at this time.
:(

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

Re: Output variable on file

Post by odklizec » Mon Dec 18, 2017 12:48 pm

Hi,

I'm afraid, there is no such option at this time. You can always create a feature request via UserVoice platform:
https://uservoice.ranorex.com/forums/15 ... ve-ranorex
However, I think it would be much faster to use the code I provided or find something else. As for programming knowledge, I think it's a good time to start learning something new? Many things could be automated via Recordings. But some special tasks simply needs custom code.
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