How can I know whether Firefox has loaded a web page completelly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carmaogo
    New Member
    • Mar 2010
    • 1

    How can I know whether Firefox has loaded a web page completelly

    Hi.
    I am using Firefox to load programmaticall y a webpage (I use a vbs file).
    Code:
    Dim objShell
    Set objShell=CreateObject("WScript.Shell")
    objShell.Run "firefox.exe http://www.google.com/"
    Then, I have set a time out to allow browser to load completely the web page before my program to continue with the next steps:
    Code:
    WScript.Sleep 5000
    (a web page is expected to load in maximum 5 seconds).
    However, there are webpages that are loaded in 20-30 seconds.
    In order to define an appropriate time for each user to expect the page to load, I need to know how can my program know when Firefox has loaded a web page completely.
    Of course, to cover all cases I could setup a 50 seconds time within the program, but I am afraid the user will become bored for pages that are loaded in 5 seconds and then the program does nothing for the next 45 seconds.
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    i don't think that you could get a notification from firefox ... since you would need to have an API for asking firefox about the occuring events like a window.onload or similar ... i doubt that this will be possible ...

    Comment

    Working...