Page 1 of 1

Take a screenshot outside of TestModule?

Posted: Thu Feb 02, 2012 10:45 pm
by taralex
I'm doing the following:

Code: Select all

TestReport.StartTestSuite("TestSuite");
TestReport.StartTestCase("TestCase");
Report.Screenshot();
TestReport.EndTestCase();
TestReport.EndTestSuite();
The screenshot is saved with the report, but I don't see it on the report. Now if I do Report.Screenshot within a TestModule, then it shows up ok. Is it a requirement that screenshots need to be only inside a TestModule?

Re: Take a screenshot outside of TestModule?

Posted: Fri Feb 03, 2012 12:55 pm
by Support Team
Hi,
taralex wrote:The screenshot is saved with the report, but I don't see it on the report. Now if I do Report.Screenshot within a TestModule, then it shows up ok. Is it a requirement that screenshots need to be only inside a TestModule?
Sorry but this is not possible out of the box.
You should be able to transform the XSL file of your Report, because as you said the XML tag is available in the report. Now you have to adapt the XSL file to show the screenshot.

Why do you need this feature?

Regards,
Peter
Ranorex Team

Re: Take a screenshot outside of TestModule?

Posted: Fri Feb 03, 2012 3:26 pm
by taralex
In my case I let the users create their test case files and it's up them to break them down to TestModules or not. But I want to always make a screenshot if a TestCase returns failure. So I noticed if the user doesn't bother to open a TestModule and log some info there, my screenshot doesn't show up on the report...

But thanks for the info, I'm going to look at the XSL file to see if I can modify it to show the screenshot.