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

Add scrollTo method #684

Merged
merged 3 commits into from
Oct 24, 2019
Merged

Conversation

mbardelmeijer
Copy link
Contributor

Re-submission of #367.

When using click on elements which are not in the viewport, it's quite handy to add a simple scrollTo call to ensure the browser has the element in the viewport. We macro this in all our projects, but would be nicer to have support for this in the core.

Example:

$browser->visit(route('overview'))
   ->scrollTo('@create')
   ->click('@create')

@taylorotwell taylorotwell merged commit 8455ec1 into laravel:5.0 Oct 24, 2019
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.

4 participants