Save more than 3 screenshots on error

Ranorex Spy, Recorder, and Studio.
tmcpherson
Posts: 14
Joined: Tue Nov 08, 2016 4:24 pm

Save more than 3 screenshots on error

Post by tmcpherson » Wed Jun 28, 2017 8:10 pm

Currently, Ranorex will save a screenshot when an error occurs. It also the screenshots of the two actions prior to the error occurring. Is there a way to make it save more screenshots without explicitly calling the screenshot method?

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Save more than 3 screenshots on error

Post by qwertzu » Thu Jun 29, 2017 2:15 pm

Hi tmcpherson,

Creating screenshots via adding a new action or within code would be the only way to achieve your goal.
There currently exists no setting for reporting screenshots for all or for multiple actions.

regards,
qwertzu

tmcpherson
Posts: 14
Joined: Tue Nov 08, 2016 4:24 pm

Re: Save more than 3 screenshots on error

Post by tmcpherson » Thu Jun 29, 2017 3:30 pm

That's disappointing. Thanks for the info.

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

Re: Save more than 3 screenshots on error

Post by Support Team » Fri Jun 30, 2017 7:09 am

Hello tmcpherson,

In order to set the number of tracing screenshots hold per module, you can use the following line of code:

Code: Select all

Ranorex.Core.Reporting.TestReport.TracingScreenshotCountLocal=3;
Tracing screenshots are stored and shown in the report in case the module fails and so this code sample should be exactly what you need.

regards,

Stephan
.
Image

tmcpherson
Posts: 14
Joined: Tue Nov 08, 2016 4:24 pm

Re: Save more than 3 screenshots on error

Post by tmcpherson » Fri Jun 30, 2017 1:49 pm

That is exactly what I needed. Thanks!