Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

InternetExplorerDriver does not support taking screenshots #326

Closed
lukeis opened this issue Mar 2, 2016 · 12 comments
Closed

InternetExplorerDriver does not support taking screenshots #326

lukeis opened this issue Mar 2, 2016 · 12 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 326

What steps will reproduce the problem?
Attempt to cast InternetExplorerDriver to TakesScreenshot in Java (or 
ITakesScreenshot in .NET).

What is the expected output? What do you see instead?
The driver does not implement the interface.

I'm attaching a patch to the C++ code that takes a screenshot of the 
current page, but it really needs to be code-reviewed before being checked 
into the project.

Reported by james.h.evans.jr on 2010-01-19 18:32:21


- _Attachment: [IEScreenshot.patch](https://storage.googleapis.com/google-code-attachments/selenium/issue-326/comment-0/IEScreenshot.patch)_
@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by james.h.evans.jr on 2010-01-19 18:41:36

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

New patch that should alleviate crash. This supercedes the previous patch.

Reported by james.h.evans.jr on 2010-01-19 21:55:58


- _Attachment: [IEScreenshot2.patch](https://storage.googleapis.com/google-code-attachments/selenium/issue-326/comment-2/IEScreenshot2.patch)_

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Possibly if there is no current window/document, we want to throw an exception rather

than return L"" - I think this would be more meaningful.

Maybe name pageCount (line 117) verticalPageCount to be explicit and contrast with

horizontalPageCount

How does it behave with a non-integer number of pages? It looks like to will probably

replicate some of the pixels...

(I have not tested the patch - I'm assuming you have)

Reported by dawagner on 2010-01-20 13:24:40

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Re: No current window or document: My only question is "what does Firefox do"? I'll

research that further.

Yeah, the variable name should be verticalPageCount. I was just lazy.

If the page size is not an exact multiple of the viewable area, we will grab some of

the same pixels multiple times. However, when we write those pixels to the full page

image, we position them in the right place, so we are overwriting what is already 
there with an exact copy. I'm not too worried about this for the first revision; if

someone wants to come along later and fix it up, that's okay with me.

Reported by james.h.evans.jr on 2010-01-20 14:33:15

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Is there a way to capture the full buffer at once rather than scrolling?  Scrolling
ends up not working well with fixed position elements.  I suspect it's a problem for
sites that iteratively add content as you reach the bottom of the viewport as well.

Reported by nirvdrum on 2010-01-25 21:47:13

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I have also looked into screenshots for IE, and I'd like to merge our efforts. But,

when I use your code on IE8, the screenshot is not right (attached converted to PNG).

It looks like the width isn't properly calculated and it's not scrolling. I will try
to 
figure out what the issue is.

Reported by thaddock@google.com on 2010-01-27 01:11:03

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Funny, I use IE8 to develop against and I didn't see any issues. Could you post the
PNG?

Reported by james.h.evans.jr on 2010-01-27 01:30:43

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Sorry, thought I attached it, here it is.

Reported by thaddock@google.com on 2010-01-27 01:38:13


- _Attachment: TEST.PNG
![TEST.PNG](https://storage.googleapis.com/google-code-attachments/selenium/issue-326/comment-8/TEST.PNG)_

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by dharani@google.com on 2011-01-21 20:57:48

  • Labels added: Browser-IE

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by michael.tamm2 on 2011-05-13 20:36:25

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

dup and fixed with item #5876

Reported by wddajd on 2015-05-13 03:07:01

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 17:48:08

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 2, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant