Get Run Configuration Name w/ C#

Ask general questions here.
sean-phillips
Posts: 8
Joined: Mon Jan 26, 2015 8:22 pm

Get Run Configuration Name w/ C#

Post by sean-phillips » Mon Mar 28, 2016 1:46 pm

I need to return the Run Configuration name to a string in C# for reporting purposes. I've tried using the code below but I can't seem to get the syntax right. Any help would be appreciated.

Code: Select all

 string strString = Ranorex.Core.Testing.TestSuiteRunConfig.Name.ToString();

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

Re: Get Run Configuration Name w/ C#

Post by odklizec » Mon Mar 28, 2016 1:54 pm

Hi,

I believe you are looking for actually selected run configuration? In this case, use this code...

Code: Select all

string strString = TestSuite.Current.SelectedRunConfig.Name.ToString();
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