I've faced the problem with filling fields of a page. When BrowserDocumentComplete event is launched I don't have any content to work with. If I put the URL constant's value into IE's url field the page will be loaded. I think that it is somehow connected with the page I navigate to: it has .srf extention. I haven't find any examples of working with such pages so I hope someone can help me here. All I have found is the description of this file type: Server Response File.
Thanks in advance!
P.S. Here's the code where I try to fill the fields:
procedure TForm1.BrowserDocumentComplete(ASender: TObject; const pDisp: IDispatch; const URL: OleVariant);
var
I: Integer;
Document: IHTMLDocument2;
Tags: IHTMLElementCollection;
Element: IHTMLElement;
begin
if ASender is TWebBrowser then
begin
Document := TWebBrowser(ASender).Document as IHTMLDocument2;
if Assigned(Document) then
begin
... //Here Document.body.innerHtml is empty
end;
end;
end;