Skip to content

Conversation

rabrowne85
Copy link
Contributor

Expanding on the existing helpers for screenshot and responsiveScreenshots this new helper is for taking a screenshot of a specific element, by passing in the $selector for the element and then using the takeElementScreenshot() method of the RemoteWebElement::class.

As the element needs to be 'in view' before the screenshot can be taken, the helper first calls scrollIntoView before taking the screenshot.

Of course, the same could be achieved by adding a Browser::macro in the service provider, but this pull request would put it alongside the existing methods and include in the package.

Tests have been included that follow a similar pattern as those for the screenshot method.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants