I am trying to write a simple (or complex) function to add to my Common Modules. I want the Function to wait until the IE window is done being busy. I also don't want to pass any Attaches.
All of the pages for the IE SUT have tables so..
I orginally tried;
Public Function DoWait()
If htmlTable("Index=1", tpAttachNoWait).Exists = False Then
Sleep 0.5, tpPauseSeconds
Loop Until htmlTable("Index=1", tpAttachNoWait).Exists = True
But it still didn't work. I've posted something about this in the past and have gone thru all the searches on this forum but I still can't get it to work. CompuWare has not helped either.
So for example I have a combobox that gets populated first, then following objects get populated. I don't want to keep writing new code to capture the second combobox prior to populating the first combobox then wait until the second combobox gets populated to continue with the script.
Plus I have other objects that busy IE once populated so this function would be great to use anywhere.. So the script code would eventually look like this;
Please Help.. Another thought, is there a way to use the IE Status Bar, ya know when you click on an object/link and the page redirects or refreshes and the Status Bar of IE "slides" over till the page is done (or done being busy)..
THANKS!!! Appreciate it as always, just one questions for you..
I am using this function that you wrote in that prior post:
Use reference to Internet Explorer Controls..and pass the window name you want to wait in IEpg.
Put this code in Shared Modules and place a call to function when ever required.
Public Function IESync()
Dim IE As New InternetExplorer, MyIE As New InternetExplorer
Dim wShell As New ShellWindows
Dim sAccType As String, IEpg As String, Elaps_Time As Integer
For Each MyIE In wShell
If MyIE.LocationURL Like "*" & IEpg & "*" Then
Set IE = MyIE
Elaps_Time = 0
Elaps_Time = Elaps_Time + 1
Sleep 1, tpPauseSeconds
Loop Until IE.Busy = False And Elaps_Time < IE_Sync_Time
My question is, what is IE_Sync_Time? I stepped thru the code and IE_Sync_Time is always "". Is there something I missed??