Using the Watir examples I found a function that gets the html page and I guessed that you could get the length using:
> puts ie.html.length
This spits out a number that is not quite what I expected - it's a bit low. So, I output what the function gets (e.g. using "puts ie.html") and I copied it to a text file. I then went to the web browser and used View > Page Source and saved the output to a different file. Comparing the page outputs I got the following numbers:
> ie.html.length = 12653
> File size of original Page source = 14260 bytes
Visually comparing these files, I found that when you use View > Page Source from the browser, you get the whole Page HTML, but when you use the Watir " ie.html" method, you get a stripped down version of the page html. For example, the Header info is absent as well as any pretty indenting.
That might be good for when I need to parse the file and get specific info out of it, but not when I need to know the exact page size. Is there a way that I can use Watir or Ruby to collect the *whole* page html?
Incidentally, someone once mentioned to me that there is a down_load_time attribute, but I can't find any info on it anywhere. Is there a reference in the Watir API or elsewhere that can tell me what methods and attributes are available for working with the HTML pages?
Thanks. Paul.
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
