Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Helper elementScreenshot #1093

Merged
merged 3 commits into from
Mar 19, 2024
Merged

New Helper elementScreenshot #1093

merged 3 commits into from
Mar 19, 2024

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.

@taylorotwell taylorotwell merged commit 783382b into laravel:8.x Mar 19, 2024
17 checks passed
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.

None yet

2 participants