Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Poltergeist page.driver.resize(width, height) and page.driver.scroll_to(left, top) are doing nothing

I'm using poltergiest and phantomjs for my integration tests and I need to test behavior for a user scrolling down the page and adjusting the browser window. I've used both page.driver.resize(width, height) and page.driver.scroll_to(left, top). I've taken screenshots before and after the method is called, and nothing seems to happen. The method is called successfully, but has no effect on the page. Does anyone know why this might be?

like image 627
bigbusterswife Avatar asked Feb 10 '14 23:02

bigbusterswife


1 Answers

Try this one for resizing:

page.driver.resize_window(width, height)
like image 168
installero Avatar answered Oct 20 '22 23:10

installero