Hi Team,
I am facing issue with ReportToPDF module in ranorex automation helpers library. After executing my suit I am getting an error message 'XML file not found' . Kindly support.
Thanks and Regards
Krishna
XML file not found error while using ReportToPDF module from automation helpers.
Re: XML file not found error while using ReportToPDF module from automation helpers.
Hi,
My guess is, that the 'Xml' variable (used in ReportToPDFModule file) is not bound to the data connector of your choice? Either this, or the XML file is not where the Xml variable points?
BTW, it seems the style sheet xml is not a part of Ranorex automation helpers, so I think you must download it here:
https://www.ranorex.com/blog/ranorex-re ... onversion/
My guess is, that the 'Xml' variable (used in ReportToPDFModule file) is not bound to the data connector of your choice? Either this, or the XML file is not where the Xml variable points?
BTW, it seems the style sheet xml is not a part of Ranorex automation helpers, so I think you must download it here:
https://www.ranorex.com/blog/ranorex-re ... onversion/
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: XML file not found error while using ReportToPDF module from automation helpers.
Hi,
Thanks for your update.
I have given values for the below three variables through data binding in ReportToPDF module. Still after running the suit its showing the error "xml file not found". Could you please explain how to make it work.
PDFName
XML
Details
Thanks for your update.
I have given values for the below three variables through data binding in ReportToPDF module. Still after running the suit its showing the error "xml file not found". Could you please explain how to make it work.
PDFName
XML
Details
Re: XML file not found error while using ReportToPDF module from automation helpers.
Hi,
Could you please post complete Ranorex report, with error you are getting? Are you sure the XML file is at pointed path (by data connector)?
Could you please post complete Ranorex report, with error you are getting? Are you sure the XML file is at pointed path (by data connector)?
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: XML file not found error while using ReportToPDF module from automation helpers.
Hi,
In the ranorex report there is no specific error message visible.
I am getting the xml not found error in the command prompt.
Could you please help me on it. Actually I need to know where to find the xml file or its already there in the helper library ?
and
What value we should give for the xml variable in data binding of ReportToPDF module ?
Kindly support.
In the ranorex report there is no specific error message visible.
I am getting the xml not found error in the command prompt.
Could you please help me on it. Actually I need to know where to find the xml file or its already there in the helper library ?
and
What value we should give for the xml variable in data binding of ReportToPDF module ?
Kindly support.
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: XML file not found error while using ReportToPDF module from automation helpers.
Hi,
The value of the XML parameter must be either empty or contain the correct path to your custom stylesheet.xml.
The stylesheet template can be found here: stylesheet
Cheers,
Robin
The value of the XML parameter must be either empty or contain the correct path to your custom stylesheet.xml.
The stylesheet template can be found here: stylesheet
Cheers,
Robin
Re: XML file not found error while using ReportToPDF module from automation helpers.
I've experienced that even my path is correct and I am able to change custom logo PDF in my local environment, when running through Jenkins on other VM, the binding is just not working. If I bind xml variable, no PDF would generate.
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: XML file not found error while using ReportToPDF module from automation helpers.
Hi,
I'm pretty sure that the stylesheet.xml is simply not found on your Jenkins environment. Try to place the file to a local folder, e.g. "C:\temp\stylesheet.xml" and bind that value. Ensure that the file is available on your Jenkins slave and you should be fine.
Cheers,
Robin
I'm pretty sure that the stylesheet.xml is simply not found on your Jenkins environment. Try to place the file to a local folder, e.g. "C:\temp\stylesheet.xml" and bind that value. Ensure that the file is available on your Jenkins slave and you should be fine.
Cheers,
Robin
Re: XML file not found error while using ReportToPDF module from automation helpers.
Thanks for your reply Robin,
I found all the files on the VM just as if on my local machine, however, binding with xml does not seem to work in my VM environment even if custom logo path is correct.
I found all the files on the VM just as if on my local machine, however, binding with xml does not seem to work in my VM environment even if custom logo path is correct.
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: XML file not found error while using ReportToPDF module from automation helpers.
Hi,
I'm out of ideas. To further analyse the issue, we would need the error message you receive. You can add a "Console.ReadKey()" to the end of your Program.cs file to ensure the CMD window remains open, once the test finishes:
Cheers,
Robin
I'm out of ideas. To further analyse the issue, we would need the error message you receive. You can add a "Console.ReadKey()" to the end of your Program.cs file to ensure the CMD window remains open, once the test finishes:
....... catch (Exception e) { Report.Error("Unexpected exception occurred: " + e.ToString()); error = -1; } //------------------------------------------------------Add the code here !! ------------------------------------------------------ Console.ReadKey(); return error;Within the console window, you'll receive an error message in case the ReportToPDF generation failed.
Cheers,
Robin
Re: XML file not found error while using ReportToPDF module from automation helpers.
Thanks so much for the help. So I finally figured out that in my VM I have to use absolute path for my logo file, but in my local relative path works just fine to bind xml custom log path.
I have a structure like this in my local C:\My Project\folder1\folder2\folder3, and my xml file locates in folder3, my custom image file locates in folder2. The path works just fine with "../custom.png". But this does not work for my VM environment.
In my VM there is similar structure C:\Jenkins\workspace\folder1\folder2\folder3, if my xml file locates in folder 3, using relative path just does not work, the error is "ReportToPDF: No valid logo defined". If I change the path to absolute path and locates it in folder2, like "C:/Jenkins/workspace/folder1/folder2/custom.png" this works fine.
Now I try to use wild card in the path and it does not accept. Basically I want to replace folder1 and folder2, but none of the following works, any suggestion?
"C:/Jenkins/workspace/../../custom.png"
"C:/Jenkins/workspace/**/custom.png"
"C:/Jenkins/workspace//custom.png"
I have a structure like this in my local C:\My Project\folder1\folder2\folder3, and my xml file locates in folder3, my custom image file locates in folder2. The path works just fine with "../custom.png". But this does not work for my VM environment.
In my VM there is similar structure C:\Jenkins\workspace\folder1\folder2\folder3, if my xml file locates in folder 3, using relative path just does not work, the error is "ReportToPDF: No valid logo defined". If I change the path to absolute path and locates it in folder2, like "C:/Jenkins/workspace/folder1/folder2/custom.png" this works fine.
Now I try to use wild card in the path and it does not accept. Basically I want to replace folder1 and folder2, but none of the following works, any suggestion?
"C:/Jenkins/workspace/../../custom.png"
"C:/Jenkins/workspace/**/custom.png"
"C:/Jenkins/workspace//custom.png"
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: XML file not found error while using ReportToPDF module from automation helpers.
Hi,
Please note, that the structure/working directory of your local test run and your Jenkins run might be different!
I just tried to specify a custom logo for my PDF conversion and it works flawlessly.
You can use the following notation to "navigate" to your logo image:
logo.png is directly located within the same folder as the test executable:
logo.png is located within the parent folder of the test executable:
logo.png is located within the parent folder of the parent folder of the test executable:
Cheers,
Robin
Please note, that the structure/working directory of your local test run and your Jenkins run might be different!
I just tried to specify a custom logo for my PDF conversion and it works flawlessly.
You can use the following notation to "navigate" to your logo image:
logo.png is directly located within the same folder as the test executable:
<global toc="true" logo=".\logo.png"
logo.png is located within the parent folder of the test executable:
<global toc="true" logo=".\..\logo.png"
logo.png is located within the parent folder of the parent folder of the test executable:
<global toc="true" logo=".\..\..\logo.png"Hope this helps.
Cheers,
Robin
Re: XML file not found error while using ReportToPDF module from automation helpers.
Hi Robin,
Thanks so much for your additional explanation. It worked this time, and my confusion was the custom log relative to my style.xml not the executable. After define the relative path to executable everything worked as you said.
It would be beneficial if we can add these examples to the release document to help someone with limited experience.
Cheers,
Nate
Thanks so much for your additional explanation. It worked this time, and my confusion was the custom log relative to my style.xml not the executable. After define the relative path to executable everything worked as you said.
It would be beneficial if we can add these examples to the release document to help someone with limited experience.
Cheers,
Nate