robotframework-whitelibrary icon indicating copy to clipboard operation
robotframework-whitelibrary copied to clipboard

Take Desktop Screenshot not work on with Remote Server to a Windows VM

Open bachng2017 opened this issue 6 years ago • 5 comments

Describe the bug Take Deskstop Screenshot succeed but there is no img/link in the output.html when execute a test using Remote Server to a Windows VM

Not sure if it is a bug or a feature ?

To Reproduce Execute below test agains a Windows 8.1
2019-01-31 16 03 49

Expected behavior Works as described

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 8.1

bachng2017 avatar Jan 31 '19 07:01 bachng2017

My speculation about this is that it's really not a bug, more like "missing feature". Because whitelibrary runs locally in the remote server, the screenshot is taken and stored in that remote machine and when the logs are then generated in the host that runs the main robot, file is not there. Can't think of a good solution for now to provide a workaround to get this working..

BTW, if you are on rf slack, please do join #whitelibrary-dev channel if you want to discuss the topic.

rasjani avatar Jan 31 '19 11:01 rasjani

In addition to what @rasjani mentioned, Take Desktop Screenshot is currently using robot.api.logger to embed the image in the log file, but logging with robot.api.logger is not supported by PythonRemoteServer: https://github.com/robotframework/PythonRemoteServer/issues/26

eeter avatar Jan 31 '19 11:01 eeter

Thanks for the comments and understood the current status Meanwhile, we applied a WA by combining with keywords that could capture the VM screen by VMWare webSMK feature

bachng2017 avatar Jan 31 '19 23:01 bachng2017

I have proof-of-concept code that can take any files in the Remote Python server's log directory and then transfer those into a local robot log directory with the help of two keywords. From my pov, the functionality is not really whitelibrary specific so i might make a separate rf library out of this..

However, this won't help with embedding the screenshot into robot log on basis of @eeter said ..

rasjani avatar Apr 10 '19 17:04 rasjani

https://github.com/rasjani/robotframework-remotetransfer if someone is interested to try it out ..

rasjani avatar Jun 26 '19 10:06 rasjani