automate page scroll using vbscript

霸气de小男生 提交于 2019-12-10 08:19:56

问题


I need to take complete snapshot of a page using vbscript, and to do this I need to scroll a bit down. Actually I am able to take half of the page in snapshot but I need to take the remaining part also in the next snapshot.

I tried using following once the page is loaded

ie.document.body.doScroll("pageDown")

But it is not scrolling the page down, is there any better way to do this, Actually I don't want to have a page down scroll but just 100 pixels down, Is there any way to do that?

Thanks in advance.


回答1:


You could use scrollBy over parentWindow.

ie.Document.parentWindow.scrollBy 0, 100
'as relative new.x = current.x + (0), new.y = current.y + (100)



回答2:


Simply use this: Window.Scroll x, y

Window.Scroll 0, 0


来源:https://stackoverflow.com/questions/11790471/automate-page-scroll-using-vbscript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!