question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[🐛 Bug]: getScreenshotAs on web element doesn't use retina resolution unlike driver screenshot

See original GitHub issue

What happened?

Hello,

driver.getScreenshotAs generates HiDPI screenshot when ran on retina display. webElement.getScreenshotAs generates single pixel screenshot in the same environment/test.

Didn’t notice a setting to affect this. Could you please help me figure out what am I missing?

How can we reproduce the issue?

execute `webElement.getScreenshotAs` using hi dpi output device

Relevant log output

NA

Operating System

Latest Mac

Selenium version

Java 4.1.4

What are the browser(s) and version(s) where you see this issue?

Chrome 101

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 101.0.4951.41

Are you using Selenium Grid?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
titusfortnercommented, May 26, 2022

Then it might be worth reporting the issue to chromedriver.

0reactions
github-actions[bot]commented, Jun 26, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to take Retina Screenshots with Xvfb and Selenium
File srcFile = ( (TakesScreenshot) driver ).getScreenshotAs(OutputType.FILE);. This does not work. The screenshot is in regular dpi. So the ...
Read more >
How to capture/take Selenium Screenshot as Full ... - Tools QA
Below is a fundamental syntax of capturing a screenshot, using Selenium WebDriver, of the currently visible part of the Web page: //Convert ...
Read more >
How to Take Screenshot in Selenium WebDriver - Guru99
A Screenshot in Selenium Webdriver is used for bug analysis. Selenium webdriver can automatically take screenshots during the execution.
Read more >
Capturing Screenshots of Websites From URLs in C# | Urlbox
In this tutorial, you'll learn how to take screenshots in C# using different methods. You'll learn how to create a C# project and...
Read more >
Guide to Capturing Screenshots in Selenium With Examples
Learn different ways to take screenshots in Selenium. ... Selenium screenshots can help you analyze anything from a bug to a web element....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found