Skip to content

Fail to take regular element screenshot via Safari/Mac #105

Description

@MohabMohie

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();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions