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
Post a Comment