Sign in to follow this  
Followers 0
Zohar

[Solved] How to Create a LoadWait that only Waits for the Page(HTML file), and not the Images?

5 posts in this topic

#1 ·  Posted (edited)

Hello


Sometimes when Automating IE, I load a webpage, and of course LoadWait for it till it's fully loaded, and then do my operations.

But sometimes, I need to load a webpage, and have all the HTML loaded, but no need to wait for the Images to load,
meaning I can start the automation once the Page is loaded, but not needing anything from the images/other-objects on the page.


Is there a special kind of LoadWait(or, can such one be created) so I will Wait only for the page and not the objects on it?
Something like "LoadWaitWithoutImages()"..


It can be of great use!


Thank you

BTW, I am using IE8

Edited by Zohar

Share this post


Link to post
Share on other sites



Did you look at _IELoadWait or _IELoadWaitTimeout?


If you try to fail and succeed which have you done?AutoIt Forum Search

Share this post


Link to post
Share on other sites

The simplest workaround could be disabling "Show Pictures" in IE options

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

If memory serves me well a similar request was solved by waiting for an object to exist. In a loop the existance of the object (I think it was a button) was checked and if it was found processing continued.

This approach means you have to do it yourself. :blink:

Edit: Something like this.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Country73:

Of course I did.

871:

disabling "Show Pictures" could've been good If I could do it easily.

but right now the only 2 ways I know to do it, are either automating the GUI(which will slow the script I am writing),

or changing the relevant value in Windows Registry

(which is a fast way, but cannot be done for an existing IE :graduated:

you have to do it before you open the IE instance, and when you want to resume seeing the pictures, again you cannot do it for the existing IE, because if you change the registry value, it will be updated only for newer IE windows you open).

Do you have another way to Enable/Disable showing the images in IE?

If I had "live" way to do it(for existing windows I mean) without automating the GUI, it could've been great.

water:

That Idea is very nice!

I can write a small functions that waits for the HTML object I want to automate(for example the TextBox I want to fill), and once it exists, I can start automating it.

ok this is my attempt for water's idea..

I will be more specific with my example:

take for example Google Maps:

I want to Load maps.google.com, but not wait for the whole Map Image to load,

and instead, Set some Text in the TextBox as soon as possible - as soon as the page is loaded, even without the images.

Here's what I tried:

$oIE    =_IECreate("maps.google.com",1,1,0)

While $oIE.document.getElementsByName("q").item(0)=0
    Sleep(100)
    Beep(1000,50)       ;This beep should be heard as long as we're waiting for the Object
WEnd

$oIE.document.getElementsByName("q").item(0).innerText  ="test!!!!"

anyone knows why it doesn't work?

Edited by Zohar

Share this post


Link to post
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
Sign in to follow this  
Followers 0