Question about variables.
Question about variables.
Hi,i`m doing automotive tests on 3 computers. I wanna change variable for every computer as login of computer name ( System.Environment.MachineName ). Can someone help me? I`m trying to do that as class but doesn`t work.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Question about variables.
Hello,
You could use use the following code to store your hostname in a global parameter:
Markus (T)
You could use use the following code to store your hostname in a global parameter:
public void getHostname() { TestSuite.Current.Parameters["Hostname"] = Environment.MachineName; // get current hostname Report.Info("New: " + TestSuite.Current.Parameters["Hostname"]); // store hostname in global parameter 'hostname' }Regards,
Markus (T)