18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

how to scroll the web page

beesmanbeesman Members
edited November -1 in Sahi - Open Source
hi, how to scoll web page just like PageDown automatically. Thank you!!!
Tagged:

Comments

  • narayannarayan Administrators
    _call(window.scrollTo(xCoord, yCoord));
    

    Eg.
    _call(window.scrollTo(0, 1200));
    

    Have a look at http://www.w3schools.com/HTMLDOM/met_win_scrollto.asp
  • beesmanbeesman Members
    edited June 2009
    hi, narayan . Thank you for your reply.
    it works well in google.
  • narayannarayan Administrators
    beesman,

    Looking at your examples, it looks like,
    _call(top.mainFrame.scrollTo(0, 1200));
    
    should work. But I must say that it is not the same as pressing the PageDown key.
    I will have a look at the PageDown key.

    Regards,
    Narayan
  • narayannarayan Administrators
    Hey, did you edit your reply? I thought I was answering to something else and am wondering if there is a bug in this forum software!
  • beesmanbeesman Members
    hi ,narayan .

    i would to ask why it worked in google. but in my pc it didn't work. because the page is in frameset

    <frameset rows="100%,0" frameborder="0" border = "0">
    <frame src="xxxxx.do" name="mainFrame" scrolling="yes">
    </frameset>

    _call(top.mainFrame.scrollTo(0, 1200)); ←it works well in my pc

    Thank you .
    I love sahi!!!!
  • beesmanbeesman Members
    edited June 2009
    i'm sorry i edited my question. there is no bug in this forum software! it's wonderful!!!
This discussion has been closed.