From b1511c7476dcac468af3d1c359c5ce8c49e8f7fd Mon Sep 17 00:00:00 2001 From: Jonathan Goode Date: Thu, 23 Apr 2020 09:27:14 +0100 Subject: [PATCH] Document in Dusk scrolling an element into view --- dusk.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dusk.md b/dusk.md index ed3f8ffd52e..8ee6de005db 100644 --- a/dusk.md +++ b/dusk.md @@ -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) @@ -660,6 +661,14 @@ You may assert on the state of the Vue component like so: }); } + +### 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'); + ## Available Assertions