none
Waiting while a page is loading (COM object) RRS feed

  • Question

  • IE 11 (using COM automation object via PowerShell)

    I can provide the public web site address (REMOVED), but I doubt someone is willing to go so far as to create a login, etc., so I'm hoping someone can give me some things to try...

    I'm trying to automate a web site.  I've tried to use the busy() method, for example, but doesn't seem to apply here and probably doesn't apply in this case.

    As you click on different links, you get a "loading" screen.  So far, the only thing I've been able to figure out and get working is to wait 5 seconds before continuing but is there a better way?

    This is what shows while the next page loads (the French version of "loading"):

    I don't know if this is client-side Javascript or something else.

    Any tips on where I can go next?  I did think about possibly just doing a loop to look for something on the page once it loads.  I'm sure I could look for a string on a button in a continuous loop until it appears, then I know it's done loading.


    • Edited by Marco.Shaw Sunday, April 2, 2017 10:23 PM
    Sunday, April 2, 2017 2:57 PM

Answers

  • Hi,

    there are plenty of tips from answered questions about COM automation of IE and powershell at

    http://stackoverflow.com/search?q=%5Binternet-explorer%5DCOM+automation%2C+powershell

    your screen shot shows an AJAX request 'waiting' animation, in which case you need to loop testing the document.readyState==4.

    This forum is for Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions.

    Your question would be better suited to posting to a coding or scripting forum.

    Regards.


    Rob^_^

    • Marked as answer by Marco.Shaw Sunday, April 2, 2017 10:23 PM
    Sunday, April 2, 2017 9:48 PM

All replies

  • Hi,

    there are plenty of tips from answered questions about COM automation of IE and powershell at

    http://stackoverflow.com/search?q=%5Binternet-explorer%5DCOM+automation%2C+powershell

    your screen shot shows an AJAX request 'waiting' animation, in which case you need to loop testing the document.readyState==4.

    This forum is for Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions.

    Your question would be better suited to posting to a coding or scripting forum.

    Regards.


    Rob^_^

    • Marked as answer by Marco.Shaw Sunday, April 2, 2017 10:23 PM
    Sunday, April 2, 2017 9:48 PM
  • Thanks.  I'll look elsewhere.

    BTW - I rewrote my script replacing all the 5 second pauses with waiting for readyState equals to 4 and no go...  Every single time I get that property, it's 4 when I know the page is still loading.

    Sunday, April 2, 2017 10:23 PM