Forum Discussion

NThomas's avatar
NThomas
Occasional Contributor
7 years ago
Solved

Capture log errors screen between the mobile and the desktop

Hello,   I wanted to know if we could choose where to take the screenshot, when there is an error, if we run Mobile and Desktop tests? Currently, if a mobile is connected and used during a test, a...
  • AlexKaras's avatar
    AlexKaras
    7 years ago

    Ah, now I see...

    Yes, you may pass proper picture object to Log.Error() to have it (picture) to be posted to the log.

    E.g.:

    Log.Error('Error message', 'Extended message', pmNormal, null, Mobile.Device().Desktop.Picture())

    or

    Log.Error('Error message', 'Extended message', pmNormal, null, Sys.Desktop.Picture())