Omenia / robotframework-whitelibrary

Library for automating Windows GUI technologies with Robot Framework. WhiteLibrary wraps the White automation framework.
Apache License 2.0
54 stars 15 forks source link

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

Open bachng2017 opened 5 years ago

bachng2017 commented 5 years ago

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):

rasjani commented 5 years ago

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.

eeter commented 5 years ago

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

bachng2017 commented 5 years ago

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

rasjani commented 5 years ago

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 commented 5 years ago

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