Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Ability to focus on an element? #207

Open
jub0bs opened this issue May 6, 2020 · 1 comment
Open

Ability to focus on an element? #207

jub0bs opened this issue May 6, 2020 · 1 comment

Comments

@jub0bs
Copy link

jub0bs commented May 6, 2020

I'm trying to navigate down a JavaScript-heavy page. Is there any way to focus on a given page element (e.g. to force an infinite scroll to kick in)?

@spaiki007
Copy link

for i := 0; i < 10000; i += 500 {
page.RunScript("window.scrollTo(0, offset);", map[string]interface{}{"offset": i}, nil)
time.Sleep(1000 * time.Millisecond)
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants