testing - How to use scrollTop in behat? -


i have page, when enter page show below part only, want scroll click 1 of element present in top of page.how can achieve that,i tried below not working.

$this->getsession()->wait(5000, "jquery('#page').animate({scrolltop: '-500px'}, 300)");  

thanks in advance.

you can use action this:

$this->getsession()->executescript('window.scrollto(0,0);'); 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -