selenium-shutterbug
selenium-shutterbug copied to clipboard
Fail to take regular element screenshot via Safari/Mac
When I use this line of code with safari
Shutterbug.shootElement(driver, elementLocator, CaptureElement.VIEWPORT, true);
the result is the below exception whereas I chose a VIEWPORT image that should have no scrolling
`java.lang.UnsupportedOperationException: Full scrollable element screenshot is supported in Chrome, Firefox and MicrosoftEdge browsers only.
at com.assertthat.selenium_shutterbug.utils.web.Browser.takeFullPageElementScreenshot(Browser.java:184)
at com.assertthat.selenium_shutterbug.utils.web.Browser.takeElementViewportScreenshot(Browser.java:657)
at com.assertthat.selenium_shutterbug.core.Shutterbug.shootElement(Shutterbug.java:295)`
the issue is traced to this line of code
BufferedImage image = takeFullPageElementScreenshot();
which should be changed to
BufferedImage image = takeScreenshot();
@glibas any news about this issue my friend?
Hi @MohabMohie ,
If following your suggesting of changing
BufferedImage image = takeFullPageElementScreenshot();
which should be changed to
BufferedImage image = takeScreenshot();
this will result in incorrect behaviour as takeScreenshot(); won't take the element screenshot which is passed as elementLocator.