How to trigger a window.scrollTo(x, y) in phantomJS

Jeff02

New Member
I open a web page, and I want trigger a scrolling in onLoadFinished callback.but it dose't working. I also tried scrollPosition and set timer to sent key event.Both of them dose't working.So ask for help.\[code\]page.onLoadFinished = function() { window.scrollTo(0, document.height);}page.open('http://www.weibo.com', function (status) { if (status !== 'success') { console.log('Unable to open weibo.com'); }}\[/code\]
 
Back
Top