SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

IE fails to take proper screenshots when in fullscreen mode #4067

Open lukeis opened 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 4067

What steps will reproduce the problem?
1. Open any page in WebDrivered and fullscreened IE8.
2. Take a screenshot.

What is the expected output? What do you see instead?
- The screenshots should be ok, they are somewhat shifted, uncomplete, partly black.
Sample input attached.

Selenium version: 2.21.0
OS: Win XP SP3
Browser: IE8
Browser version: 8

The browser is fullscreened either after its start by calling

Robot r = new Robot();
r.keyPress(java.awt.event.KeyEvent.VK_F11);
r.keyRelease(java.awt.event.KeyEvent.VK_F11);

or was fullscreened from beginning, it doesn't make any difference.

Unfullscreened screenshots are alright. They are also OK on fullscreened Firefox 12.

Reported by PhotoSlanec on 2012-06-11 17:41:49


lukeis commented 8 years ago

Reported by barancev on 2012-06-12 13:30:13

lukeis commented 8 years ago
Hi,

i reproduced this issue at Vista+IE9 configuration.

After investigation i see that at least at my machine source is unknown - PrintWindow

https://code.google.com/p/selenium/source/browse/trunk/cpp/IEDriver/CommandHandlers/ScreenshotCommandHandler.h#165
and BitBlt (as alternate try) called with correct parameters don't return error but
just write to image only visible area. :(

I'll try dig more someday.

Reported by a.u.savchuk on 2012-07-25 02:41:50

lukeis commented 8 years ago
Ok, after some googling i figured out that fullscreen application needs to unzoomed/zoomed
in another way than usual maximized:

http://stackoverflow.com/questions/3549148/fullscreen-management-with-winapi
http://stackoverflow.com/questions/2382464/win32-full-screen-and-hiding-taskbar

it needed to be implemented and covered by tests if it's still necessary.

Reported by a.u.savchuk on 2013-05-02 08:08:27

lukeis commented 8 years ago

Reported by a.u.savchuk on 2013-07-23 19:56:06

lukeis commented 8 years ago
hi there, im getting similar bacl screen and at time blank images in html report.

i did check most setting, ie zoom to 100%, the security zone all set to same level.

running via command prompt is fine, junit html report displaying fine and capture screenshot
in that html is displayed accordingly.

however running the same script via jenkins not displaying screenshot instead blank
image.

test machine on win xp, running jenkins via windows service and iedriver 32 is the
latest version downloaded. selenium jar is latest version 2.35.

pls assist further.

Reported by s.sindhukumar07 on 2013-10-06 16:50:58

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 17:44:49