[Ruby] Selenium Webdriver + IE + Jenkins, blank screenshot of web application page

2,565 views
Skip to first unread message

Vid

unread,
May 22, 2013, 7:45:29 AM5/22/13
to webd...@googlegroups.com
Hi,

We are using selenium webdriver with cucumber and ruby for automation testing of our web application. We execute our tests through Jenkins.

We are facing an issue while taking screenshot during test execution on IE, the screenshot comes black. However, there is no issue when we run tests on IE on local machine (without Jenkins). Also, we are able to successfully take screenshots on firefox through Jenkins.

Could anyone help with this issue please?

Thanks.
Divya

Alexandr Savchuk

unread,
May 23, 2013, 10:03:07 AM5/23/13
to webd...@googlegroups.com
As initial information i'd recommend to read http://ausavchuk.blogspot.ru/2013/05/screenshots-for-headless-configuration.html
and search for similar topics.

среда, 22 мая 2013 г., 15:45:29 UTC+4 пользователь Vid написал:

Mark Collin

unread,
May 24, 2013, 7:23:44 AM5/24/13
to webd...@googlegroups.com
I would guess your screen is locked, the user running IE tests needs to
be logged in and the screen can't be locked if you want screenshots.
> --
> You received this message because you are subscribed to the Google
> Groups "webdriver" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to webdriver+...@googlegroups.com.
> To post to this group, send email to webd...@googlegroups.com.
> Visit this group at http://groups.google.com/group/webdriver?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

divya madaan

unread,
May 24, 2013, 9:52:14 AM5/24/13
to webd...@googlegroups.com

Mark,
We are running tests through Jenkins so tests automatically are headless. Does locking of machine matter in this case?

On May 24, 2013 4:54 PM, "Mark Collin" <mark....@lazeryattack.com> wrote:
I would guess your screen is locked, the user running IE tests needs to be logged in and the screen can't be locked if you want screenshots.

On 22/05/2013 12:45, Vid wrote:
Hi,

We are using selenium webdriver with cucumber and ruby for automation testing of our web application. We execute our tests through Jenkins.

We are facing an issue while taking screenshot during test execution on IE, the screenshot comes black. However, there is no issue when we run tests on IE on local machine (without Jenkins). Also, we are able to successfully take screenshots on firefox through Jenkins.

Could anyone help with this issue please?

Thanks.
Divya
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+unsubscribe@googlegroups.com.

To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to a topic in the Google Groups "webdriver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webdriver/IR-0dMHzI7g/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to webdriver+unsubscribe@googlegroups.com.

Mark Collin

unread,
May 24, 2013, 10:00:52 AM5/24/13
to webd...@googlegroups.com
Windows can't be headless, you always need to be logged into a GUI somewhere.

Your Jenkins slave will need to be logged in and the screen not locked if you want screenshots (I'm assuming you're not using a windows machine as your Jenkins server).


On 24/05/2013 14:52, divya madaan wrote:

Mark,
We are running tests through Jenkins so tests automatically are headless. Does locking of machine matter in this case?

On May 24, 2013 4:54 PM, "Mark Collin" <mark....@lazeryattack.com> wrote:
I would guess your screen is locked, the user running IE tests needs to be logged in and the screen can't be locked if you want screenshots.

On 22/05/2013 12:45, Vid wrote:
Hi,

We are using selenium webdriver with cucumber and ruby for automation testing of our web application. We execute our tests through Jenkins.

We are facing an issue while taking screenshot during test execution on IE, the screenshot comes black. However, there is no issue when we run tests on IE on local machine (without Jenkins). Also, we are able to successfully take screenshots on firefox through Jenkins.

Could anyone help with this issue please?

Thanks.
Divya
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.

To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to a topic in the Google Groups "webdriver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webdriver/IR-0dMHzI7g/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to webdriver+...@googlegroups.com.

To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.

divya madaan

unread,
May 24, 2013, 11:49:12 PM5/24/13
to webd...@googlegroups.com

We are using windows machines as Jenkins server and slaves.

fmtjatt

unread,
May 29, 2013, 2:12:51 PM5/29/13
to webd...@googlegroups.com
We are facing same problem here. We are using Windows Server 2003 for Jenkins which connects to Slave VM(Windows 7) to execute our tests. All the screenshots are blank and we haven't figured out how to make jenkins unlock the Slave machine so screenshots can be captured.

divya madaan

unread,
May 30, 2013, 12:11:40 PM5/30/13
to webd...@googlegroups.com

Can anyone please suggest something.This issue is still open.

Jakub Siberski

unread,
May 30, 2013, 5:00:25 PM5/30/13
to webd...@googlegroups.com
My guess would be the same as Mark said. I am not sure why you get screenshots on FF, but as far as IE is concerned I would suspect issues with GUI session.

From what I experienced in the past you get screenshots when user is logged in (as Mark said, you always need to be logged in into GUI) but screen is locked. So when you:
 - log in, then use Start->Switch user
 - log in, then Start->Lock (or when Lock happens automatically after some time of inactivity - typical policy for for corporate Win machines)
 - log in with RDP and then close RDP connection  (when closing RDP connection win gui session is locked automatically)

If either of those is true, you need to :
 - turn off automatic Locking of the screen
 - install VNC on windows machines
 - stop using RDP and connect with VNC client to them



Pozdrawiam
Jakub Siberski

Mark Collin

unread,
Jun 5, 2013, 3:53:58 AM6/5/13
to webd...@googlegroups.com
Different browsers, different technology.

IE is hooked into the OS in many ways, I would guess that if the OS is not rendering a GUI then IE will not render it either. 

The reason other browsers will work is that they will always be rendering the page internally and the Selenium screenshot mechanism uses this as the source for the screenshot, not what is displayed on screen. (That's why you don't see the mouse cursor, or dialogue boxes covering the browser, etc when you take a screenshot)

divya madaan

unread,
Jun 5, 2013, 6:05:29 AM6/5/13
to webd...@googlegroups.com

Thanks Mark.Atleast now I know the reason :)

Nicholas Grealy

unread,
May 8, 2014, 12:59:22 AM5/8/14
to webd...@googlegroups.com
This worked for me - http://ausavchuk.blogspot.ru/2013/05/screenshots-for-headless-configuration.html

Specifically, setting "Allow service to interact with desktop" for my Tomcat service (Start > Run > services.msc):

2. if you use service-based configuration you _need_ to set "Allow service to interact with desktop" option enabled for the service. Otherwise service can not interact with desktop.
Reply all
Reply to author
Forward
0 new messages