I am trying to make a program to automatically login to my website it will do this by loading a WebBrowser and navigating to the login page of my site then I want it to edit the value of the username and password box.
I just do not know how to do this in Delphi. I have a working version of this program made in VB and the command is...

WebBrowser1.Document.All("username").Value = "Username Here"

But that will not work in Delphi.
I hope someone can help me with this.

Why doesnt it work? Remember that "username" will be case sensitive.

Well when I try to use that code I just get this error...

[Error] a.pas(312): Undeclared identifier: 'All'

Try WebBrowser1.oleobject.document.all ..

When I try that I get...

---------------------------
Debugger Exception Notification
---------------------------
Project main.exe raised exception class EOleSysError with message 'Not implemented'. Process stopped. Use Step or Run to continue.
---------------------------
OK   Help   
---------------------------

Im guessing username is in a form? then you'd need to go through the whole document tree, eg forms etc

Because you didnt change your code...
You need to look through the elements available, most likely rather than "All" you probably want forms..

It depends a lot on the html

Because you didnt change your code...
You need to look through the elements available, most likely rather than "All" you probably want forms..

It depends a lot on the html

Oh I just copied the wrong line of code I had changed it to .Form and the .Forms I have tried every thing that I could think of and still it gives me the error.
Well I guess I will try some other sites also to see if anyone can help me.

Well the Forms part has always worked for me, however, it may vary with delphi versions, as well as the HTML you have.. so.. you need to debug it. That always has the answers

Well the Forms part has always worked for me, however, it may vary with delphi versions, as well as the HTML you have.. so.. you need to debug it. That always has the answers

Yeah I am using Delphi 7.

This article has been dead for over six months. Start a new discussion instead.