Page 1 of 1

How can I access Global Parameters from Program.cs?

Posted: Wed Mar 23, 2016 4:12 pm
by stapes
I have added an Email Logger to my Test Suite.

Code: Select all

// add a report logger that sends reports via email
            
string from = "[email protected]";
string to = "[email protected]";  		
string subject="Ranorex Report for CustomLogging";
string cc="";
    		
MailLogger mailLogger = new MailLogger(from , to, subject, cc  );
Report.AttachLogger(mailLogger);
I would like to be able to put the values shown here, from, to & cc - in the Global Parameters.

Is this possible? If so, how?

Re: App get crashed while tap on element in iOS Instrumented app

Posted: Wed Mar 23, 2016 9:41 pm
by odklizec
Hi,

You can get the value of Global Parameter via code like this...

Code: Select all

string from = TestSuite.Current.Parameters["ParameterName"];
Hope this helps?