Hello to all! I have this problem with my code, basically heres what it does > load page > get html > click button (after this some part of the pag will reload)> then get html again > then click button then a a part of the page will reload and so on repetitively... here is my code:
the problem is , when the code runs the first click start, a part of the page will reload, but the next methods only get the 1st html values, I need to somewhat tell vba that the html has change so I can get the new values from that new html
Code:
Sub Website_Login_Test()
Application.ScreenUpdating = False
Dim oHTML_Element As IHTMLElement
Dim sURL As String
Dim evt As Object
On Error GoTo Err_Clear
sURL = [URL]http://www.xmypage.secure.jsp[/URL]
Set oBrowser = New InternetExplorer
oBrowser.Silent = True
oBrowser.timeout = 60
oBrowser.Navigate sURL
oBrowser.Visible = True
Do
' Wait till the Browser is loaded
Loop Until oBrowser.READYSTATE = readystate_complete
Set HTMLDoc = oBrowser.Document
'HTMLDoc.all.q.Value = "search text"
'HTMLDoc.all.Password.Value = "examplepassword""
Do While (oBrowser.Busy Or oBrowser.READYSTATE <> READYSTATE.readystate_complete)
DoEvents
Loop
Call loopFiles
Call changeFilter
Call clickStart
Application.Wait (Now + TimeValue("00:00:02"))
Call noofMessages
Application.Wait (Now + TimeValue("00:00:02"))
Call loopFiles
Call changeFilter2
Call clickStart
Application.Wait (Now + TimeValue("00:00:02"))
Call noofMessages2
Application.Wait (Now + TimeValue("00:00:02"))
Call loopFiles
Call changeFilter3
Call clickStart
Application.Wait (Now + TimeValue("00:00:02"))
Call noofMessages3