selenium-google-code-issue-archive
selenium-google-code-issue-archive copied to clipboard
Selenium captures screenshot with height 2 pixels more than actual height
Originally reported on Google Code with ID 7633
Assumptions:
This defect is logged considering the javascript returns actual value of the screen
height.
Steps to reproduce:
1. Open any URL using FireFox/IE browsers.
2. Get the innerHeight of the visible browser content using below code.
long innerHeight=(long)((JavascriptExecutor) driver).executeScript("return window.innerHeight;")
ex: say innerHeight is 885.
3. take screen shot of the current screen using below code.
((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
Note: I'm using java as my programming language.
Expected behaviour:
selenium should give me an screen shot with height 885(according to above example),
but selenium gives me screen shot with height 887(2 pixels more than actual height)
in case of firefox and IE browsers.
Note: this works perfectly with chrome browser
Selenium version: 2.42.2
OS: Windows7
Browser: FireFox, IE & Chrome
Browser version: FireFox 16.0.1, IE 10.0.9 & Chrome 35.0.1916.153
Reported by shaik.raichur001
on 2014-07-22 15:25:15
Reported by barancev
on 2014-07-23 08:07:41
- Labels added: Browser-Firefox
Reported by luke.semerau
on 2015-09-17 17:47:04
- Labels added: Restrict-AddIssueComment-Commit