I get the following error:
Access violation at address 0050AA07 in the module "project1.exe". Reading address 00000000.
I am trying to autofill a form in TWebBrowser. This is just a "login" field on the form.
What does it mean? How to solve it?
procedure TForm1.Button2Click(Sender: TObject);
var
doc: IHTMLDocument2;
frm: IHTMLFormElement;
fld: IHTMLInputTextElement;
begin
doc := webbrowser1.Document as IHTMLDocument2;
frm := doc.forms.item(0, EmptyParam) as IHTMLFormElement;
fld := frm.item('login', EmptyParam) as IHTMLInputTextElement;
fld.value := 'someone';
end;
source
share