Hi Ranorex team,
Is there any way to log information/report messages to Ranorex Report from InvokeRemotely method.
Can any one please respond to this question.
Thanks
satish
Logging info from InvokeRemotely
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Logging info from InvokeRemotely
Hi,
What exactly do you want do report in your invoked method and why?
Do you want to add logging information to your Ranorex test application or to your application under test.
In general, calling methods from the Report class within InvokeRemotely methods/delegates will not add messages to the default XML file, because the code is executed in a completely different process, i.e. in the process of the control calling InvokeRemotely on.
Regards,
Bernhard
Ranorex Support Team
What exactly do you want do report in your invoked method and why?
Do you want to add logging information to your Ranorex test application or to your application under test.
In general, calling methods from the Report class within InvokeRemotely methods/delegates will not add messages to the default XML file, because the code is executed in a completely different process, i.e. in the process of the control calling InvokeRemotely on.
Regards,
Bernhard
Ranorex Support Team
Re: Logging info from InvokeRemotely
Hi Bernhard
Thanks for your reply.
As the code getting executed in a completely different process I am unable to debug what ever the code written under InvokeRemotely, so I thought is there any other alternate approach so that I could atleast print/display required information in the form of messages on to the screen only for debug purpose.
satish
Thanks for your reply.
As the code getting executed in a completely different process I am unable to debug what ever the code written under InvokeRemotely, so I thought is there any other alternate approach so that I could atleast print/display required information in the form of messages on to the screen only for debug purpose.
Thanks"Do you want to add logging information to your Ranorex test application or to your application under test."
sorry...I did not get what it means(Ranorex test application vs application under test )...
satish
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Logging info from InvokeRemotely
Hi,
In general there are various ways how you can print messages for debug purposes. You can for instance write to the console of your automation under test:
There is also a blog about this topic on our website: Transfering data to and from a .NET control.
Regards,
Bernhard
Ranorex Support Team
In general there are various ways how you can print messages for debug purposes. You can for instance write to the console of your automation under test:
MyCrtl.InvokeRemotely( delegate(System.Windows.Forms.Control control, object Null) { Console.WriteLine("Your Message"); return 0; } );You can also return the debug message as return statement of your invoked method:
// Create the Paremter Object object[] MyParams = new object[2]; // Set Parameter Values MyParams[0] = "Ranorex String Value"; MyParams[1] = 100; // Invoke public Method object res = MyCrtl.InvokeMethod ("Name of your method which should be invoked", MyParams); // Handle result from invoked Method Report.Info ("Number of Length of Param1: " + res.ToString());
There is also a blog about this topic on our website: Transfering data to and from a .NET control.
Regards,
Bernhard
Ranorex Support Team
Re: Logging info from InvokeRemotely
Thanks Bernhard for your solution...
I have one more question
After using "Optimize Folder Path" or "Abbreviate Item Path" right click options of a repository
If we wanted to go back to original paths, how can we achieve this?
Thanks
Satish
I have one more question
After using "Optimize Folder Path" or "Abbreviate Item Path" right click options of a repository
If we wanted to go back to original paths, how can we achieve this?
Thanks
Satish
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Logging info from InvokeRemotely
Hi,
There is unfortunately no function to get the old RxPath as you overrode it, you just can re-edit it with the path editor, or you can edit it with the Spy tool, there you can for instance click on "Update Path".
Regards,
Markus
Ranorex Support Team
There is unfortunately no function to get the old RxPath as you overrode it, you just can re-edit it with the path editor, or you can edit it with the Spy tool, there you can for instance click on "Update Path".
Regards,
Markus
Ranorex Support Team