Jump to content

Is this possible?


Recommended Posts

Hey,

I have an Ajax webpage that I'd like to measure it's loading time.

The thing is, if the webpage's title remains the same the entire process, how do I know when to stop the timer? I.E right now this page's title is "Posting New Topic - AutoIt Forums" and suppose I click on a link here that will use the same title.

To put it in other words, how can I tell the webpage has indeed changed?

Thanks!

Edited by 1xcalibur1
Link to comment
Share on other sites

There are probably a number of ways.

Thing is, it will be quite difficult for anyone to suggest them

without some further details, not least of which might be

In what browser? amongst others.

Please, whatever's needed let me know as I must get this right!

I have all browsers but I'm using FireFox for this test.

What else?

Link to comment
Share on other sites

Well Internet Explorer is pretty much covered by Dale's IE UDF which has

a whole array of functions.

For Example, if you start a timer and then use _IENavigate("URL"), and print the timer difference

you have the time that url took to load,

_IECreate()

_IEAttach()

_IENavigate()

TimerInit()

TimerDiff()

are the functions you want to be looking at in the help file.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Well Internet Explorer is pretty much covered by Dale's IE UDF which has

a whole array of functions.

For Example, if you start a timer and then use _IENavigate("URL"), and print the timer difference

you have the time that url took to load,

_IECreate()

_IEAttach()

_IENavigate()

TimerInit()

TimerDiff()

are the functions you want to be looking at in the help file.

OK.

But what if I dont have a URL? This is AJAX afterall...

Is it possible to measure loading times between mouse clicks?

Link to comment
Share on other sites

Offhand it appears to me what you are wanting for ajax is the time between onreadystatechange, after readyState =="complete", and when when readyState =="complete". In AutoIt you can do this using an IE com object, but more generally you need a browser plugin, or userjs. A much better option than AutoIt in this particular case. Even using AutoIt outside of IE some js is likely needed to expose the information you need. Much more work than I want to embark on to answer a forum question.

Your best option for Firefox is to try out the Firebug extension, which is well suited for debugging all sorts of ajax and other webpage related issues. If Firebug doesn't fit your needs and you are intent on using AutoIt you can download ngrep, which has a lot of GNU grep's common features built in, from sourceforge and redirect its output to your script. This will work regardless of which browser and/or application is connected to your website. If ngrep > AutoIt doesn't fit the bill nothing will.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...