Report.Screenshot with text comment as only parameter

Class library usage, coding and language questions.
Frederiksen78
Posts: 3
Joined: Mon Feb 04, 2013 3:49 pm

Report.Screenshot with text comment as only parameter

Post by Frederiksen78 » Thu Feb 21, 2013 10:11 am

I'm very much missing an option to add a screenshot to the report with an attached comment. I know that it's possible to simply add a debug or info message before the screenshot is taken, but it seems a bit backwards. Also, I would like to take a screenshot of the entire window, as I may or may not be completely certain which window or element is potentially failing.

So, what I'm looking to do is something like:

Code: Select all

Report.Screenshot("This is a comment");
Is there any way to achieve this at the moment?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Report.Screenshot with text comment as only parameter

Post by Support Team » Thu Feb 21, 2013 10:57 am

Sorry, there is no Report.Screenshot method just taking a message and we cannot add one since it would conflict with the other existing method overloads.

However, you can use the Report.Screenshot(string, Element) overload and pass in "null" as the second argument; that will take a screenshot of the whole desktop:
Report.Screenshot("This is a comment", null);
Regards,
Alex
Ranorex Team
.
Image