Hi we are automating 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.
This Question was asked already and answered as
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'
}
But our point is that above code is not working which copy it on user code
Kindly say a way to use the above code like where we have to insert and call it
Automation on different System Name
Re: Automation on different System Name
Hi,
I would suggest to read below blog post, in which you can learn how to properly share data between modules, including storing/reading data to/from parameters:
https://www.ranorex.com/blog/sharing-da ... o-another/
I'm not quite sure if the coded way you posted is recommended/publicly available way of storing/reading parameters.
I would suggest to read below blog post, in which you can learn how to properly share data between modules, including storing/reading data to/from parameters:
https://www.ranorex.com/blog/sharing-da ... o-another/
I'm not quite sure if the coded way you posted is recommended/publicly available way of storing/reading parameters.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Automation on different System Name
I added a variable to the repository in Ranorex. It is then available in c# as yourrepo.yourvariable. That way you can set a default value in Ranorex or override it in code if need be.