Jump to content

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


Recommended Posts

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
Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 3 months later...

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
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...