Hi everyone,
I would like store active view screenshots in a specific folder and not in the report folder as currently.
Someone will have an idea on how to do this?
Thank you
Mague
How to store screenshot in a specific folder?
Re: How to store screenshot in a specific folder?
Hi,
I don't think there is a way to redirect the report screenshots to user-specified directory. You can only disable (in Report settings) the collection of report images in a subdirectory. But then the images will be stored directly in the report folder. Another possibility (workaround) is to enable creation of compressed reports (rxzlog) and at the end of test delete content of report folder, except the rxzlog files.
I don't think there is a way to redirect the report screenshots to user-specified directory. You can only disable (in Report settings) the collection of report images in a subdirectory. But then the images will be stored directly in the report folder. Another possibility (workaround) is to enable creation of compressed reports (rxzlog) and at the end of test delete content of report folder, except the rxzlog files.
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
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to store screenshot in a specific folder?
Hi Mague,
The images are also stored in the output directory. You can copy the screenshot directory from there to another location at the end of you test suite, for example within the teardown section.
A description how to copy directories can be found on the website https://msdn.microsoft.com/en-us/librar ... .110).aspx
I hope this helps.
Regards,
Bernhard
The images are also stored in the output directory. You can copy the screenshot directory from there to another location at the end of you test suite, for example within the teardown section.
A description how to copy directories can be found on the website https://msdn.microsoft.com/en-us/librar ... .110).aspx
I hope this helps.
Regards,
Bernhard
Re: How to store screenshot in a specific folder?
Hi Bernhard,
But if he moves the image directory somewhere else, he will also need to edit the rxlog.data file, which references the original image dir.
But if he moves the image directory somewhere else, he will also need to edit the rxlog.data file, which references the original image dir.
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: How to store screenshot in a specific folder?
He should just COPY them somewhere else, not move them. No worries about them missing that way.
Shortcuts usually aren't...
Re: How to store screenshot in a specific folder?
Yes Kelly, but how I understand it, he doesn't want to have the screenshots in report folder at all, but still be able to see them in reports? So I think the best/easiest solution is to use compressed rxzlog and delete everything else.
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: How to store screenshot in a specific folder?
A few thoughts:
First, moving the screenshots will likely mess up the reports and should not be done. Even the Ranorex team suggests only copying, not moving, because of this.
Second, changing things like this without a very good reason (which we don't know) is almost never a good thing. This change would require what I see as unneeded extra work and would make the tests more brittle and subject to non-SUT-caused failure, while just copying the files will hurt nothing.
Third, there is not nearly enough information given in the original post to give us an accurate understanding as to WHY he might need the screenshots in another folder. If could be that he does just need a copy somewhere else, it could be that he wants to change the default location that the report screenshots are saved. We do not know. It would be helpful if Mague could expound on what he is trying to do so we could get a better picture (no pun intended...).
And the rxzlog still contains the exact same folder structure, it's just zipped. Again, without knowing exactly what he's wanting it's impossible to know if this would actually solve the perceived issue.
So, a bit more information from Mague would be extremely helpful.
First, moving the screenshots will likely mess up the reports and should not be done. Even the Ranorex team suggests only copying, not moving, because of this.
Second, changing things like this without a very good reason (which we don't know) is almost never a good thing. This change would require what I see as unneeded extra work and would make the tests more brittle and subject to non-SUT-caused failure, while just copying the files will hurt nothing.
Third, there is not nearly enough information given in the original post to give us an accurate understanding as to WHY he might need the screenshots in another folder. If could be that he does just need a copy somewhere else, it could be that he wants to change the default location that the report screenshots are saved. We do not know. It would be helpful if Mague could expound on what he is trying to do so we could get a better picture (no pun intended...).
And the rxzlog still contains the exact same folder structure, it's just zipped. Again, without knowing exactly what he's wanting it's impossible to know if this would actually solve the perceived issue.
So, a bit more information from Mague would be extremely helpful.
Shortcuts usually aren't...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to store screenshot in a specific folder?
Hi everybody,
I agree, the initial question is not clear. Mague didn't why he wants to do that and what he wants to do with the screenshots.
We should wait for the clarification and continue discussing that issue when we have more information.
Regards,
Bernhard
I agree, the initial question is not clear. Mague didn't why he wants to do that and what he wants to do with the screenshots.
We should wait for the clarification and continue discussing that issue when we have more information.
Regards,
Bernhard
Re: How to store screenshot in a specific folder?
Hi everyone,
thanks for all your answer.
I need to take screenshots of a mobile app and store them in a specific folder with a specific name because we perform localization QA tests.
But it's fine, I found a solution:
thanks for all your answer.
I need to take screenshots of a mobile app and store them in a specific folder with a specific name because we perform localization QA tests.
But it's fine, I found a solution:
Code: Select all
//Take a screenshot of a specific element
Bitmap image = Imaging.CaptureImageAuto(element.Element);
//Name and path to store the screenshot
String imageName = String.Format("screenshot_{0}.jpg",i);
String pathImageName = Path.Combine(<path to store your screenshot>, <imageName>);
//Save the screenhot in your specific folder
image.Save(pathImageName, System.Drawing.Imaging.ImageFormat.Jpeg);