Take a screenshot outside of TestModule? : Automation API

Take a screenshot outside of TestModule?

Class library usage, coding and language questions.

Take a screenshot outside of TestModule?

Postby taralex » Thu Feb 02, 2012 11:45 pm

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?
taralex
 
Posts: 57
Joined: Tue Nov 04, 2008 4:50 pm
Location: Michigan

Re: Take a screenshot outside of TestModule?

Postby Support Team » Fri Feb 03, 2012 1:55 pm

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
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Take a screenshot outside of TestModule?

Postby taralex » Fri Feb 03, 2012 4:26 pm

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.
taralex
 
Posts: 57
Joined: Tue Nov 04, 2008 4:50 pm
Location: Michigan


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests