AlexKaras's avatar
AlexKaras
Champion Level 3
4 years ago
Status:
New Idea

Disable screenshot for the given Log.Error statement

Ref: Case #00462763

 

Whether or not the screenshot is provided for the Log.Error() statement is controlled by the 'Post image on error' project's log setting. By default this setting is turned on and this seems to be the correct default behavior.

However, the setting cannot be changed from test code and sometimes there is a need to post an error to test log but without accompanying screenshot. This is not possible now.

I would like to ask to:

-- Either make the 'Post image on error' log setting to be read/write from test code; or, maybe even better,

-- Do not post an image to test log if the Picture parameter for the Log.Error() method is explicitly set to null/nil/Nothing.

 

 

1 Comment

  • Frits's avatar
    Frits
    Occasional Contributor

    A bit late to the party, but I just found the solution 🙂 

     

    Log.Error('Error message', 'Error details', 300, '', Utils.Picture);

     

    - 300 is default priority.

    - Utils.Picture returns an empty Picture object.