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

[7.x] Document in Dusk scrolling an element into view #6006

Merged
merged 1 commit into from
Apr 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dusk.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- [Scoping Selectors](#scoping-selectors)
- [Waiting For Elements](#waiting-for-elements)
- [Making Vue Assertions](#making-vue-assertions)
- [Scrolling An Element Into View](#scrolling-into-view)
- [Available Assertions](#available-assertions)
- [Pages](#pages)
- [Generating Pages](#generating-pages)
Expand Down Expand Up @@ -660,6 +661,14 @@ You may assert on the state of the Vue component like so:
});
}

<a name="scrolling-into-view"></a>
### Scrolling An Element Into View

The `scrollIntoView` method will scroll an element into view at the given selector. This is useful to call prior to interacting with an element that is not currently in view.

$browser->scrollIntoView('selector')
->click('selector');

<a name="available-assertions"></a>
## Available Assertions

Expand Down