I have a this code:
for i:=0 to Memo1.Lines.Count-1 do
begin
while WebBrowser1.Busy do Application.ProcessMessages;
WebBrowser1.OleObject.Document.Links.item(cat[i]).click;
subcatList;
end;
but WebBrowser1 run several times in spite of the expectations of the procedure. How do I start WebBrowser1 not in the background or what is the solution?
You need to implement 3 events of TWebBrowser, BeforeNavigate2, DocumentComplete and NavigateComplete2
And now you can use FDocLoaded variable to know if the page is loaded into the WebBrowser
Regards