"Take Screenshot" keyword failing when run from Jenkins

169 views
Skip to first unread message

Sounak Saha

unread,
May 13, 2019, 4:00:59 AM5/13/19
to robotframework-users

Hi,

 

I need a help for the below mentioned error:

Taking screenshot failed: IOError: screen grab failed Make sure tests are run with a physical or virtual display.

 

While running the robot test cases from Jenkins the "Take Screenshot" keyword is failing to take a screenshot and throwing an error saying: Taking screenshot failed: IOError: screen grab failed Make sure tests are run with a physical or virtual display.

Here the test case is triggered from a Jenkins job and it is getting executed in a slave machine.

The python library that I’m using here is Screenshot and located in C:\Python27\Lib\site-packages\robot\libraries\screenshot.py

 

The slave machine is been displayed using VNC Viewer.

 

Could you please help me with the steps or configurations that needs to be taken into consideration in order to resolve this issue?


Please find attached the log.html file.


Regards

Sounak

log.html

Tatu Aalto

unread,
May 14, 2019, 2:45:26 AM5/14/19
to soun...@gmail.com, robotframework-users
Ugh

As the error says, it looks like you don't have a display in the Jenkins (virtual or real one) and therefore capturing screen shot from the display fail. Discuss with your Jenkins admin how to setup a display to your Jenkins.

-Tatu
Send from my mobile

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/a8b28958-4802-46af-9d7d-d346dfdd8fef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages