After i upgrade my Ranorex studio to 7, i have the error "Argument 1: cannot convert from 'Ranorex.Core.Reporting.Activity' to 'Ranorex.Libs.Xml.IXmlPrintable' (CS1503). I don't have this issue on 6.2
My code is like in below
var item = Ranorex.Core.Reporting.ActivityStack.Instance.RootActivity;
string documentStr;
using (var ms = new System.IO.MemoryStream())
{
var sw = new System.IO.StreamWriter(ms, new UTF8Encoding(false));
var xmlPrinter = XmlPrinter.BeginDocument(sw, false);
xmlPrinter.Print(item).CompleteDocument();
documentStr = new UTF8Encoding(false).GetString(ms.ToArray());
}
the errors happened on line7. which can't convert reporting.activity to xmlPrintable
How should i fix this?
convert Ranorex.Core.Reporting.Activity on Ranorex7
Re: convert Ranorex.Core.Reporting.Activity on Ranorex7
Hello jjiang1,
Is the Ranorex-To-XUnit template what you are referring to? Ranorex-To-XUnit
You might want to read this forum post: Empty xUnit transformation after upgrading to 7.0 [SOLVED]
As stated in the above forum post, the JUnit compatible report can now be created automatically. You can read more about this in our user guide at the following link: JUnit-compatible reports
Please let the forum community know if this helped.
Regards,
McTurtle
Is the Ranorex-To-XUnit template what you are referring to? Ranorex-To-XUnit
You might want to read this forum post: Empty xUnit transformation after upgrading to 7.0 [SOLVED]
As stated in the above forum post, the JUnit compatible report can now be created automatically. You can read more about this in our user guide at the following link: JUnit-compatible reports
Please let the forum community know if this helped.
Regards,
McTurtle
Re: convert Ranorex.Core.Reporting.Activity on Ranorex7
Thank you McTurtle, you reply works for me