When working with WebDriver, there are two competing definitions for screenshot. The first is the definition used by the open source project, where the screenshot is defined as an image of the entire DOM of the loaded page. In this case, both the IE driver and the Firefox driver do the right thing, defined by the project since 2010. The implementation of Chrome WebDriver is incorrect when returning an image of only the visible view port.
The W3C WebDriver specification , on the other hand, defines screenshots of only the current viewing port. This runs counter to the current open source project driver implementations (IE and Firefox) and is expected to change in the future. Once the specification reaches the “Candidate Recommendation” status, these drivers are likely to be updated.
On the side, it should be noted that the IE driver does not in any way use the scroll and line method to create screenshots. It resizes the browser window large enough to display the entire DOM, as calculated at the time the screenshot was requested, and take a picture. Please note that when creating these screenshots with the full DOM, problems arise with IE 10 and 11, depending on the bit version of your operating system and the IEDriverServer executable file that you are using.
Currently, you will need to use an external tool for WebDriver to get screenshots only for the portfolio for IE and Firefox.
source share