0

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.

3
Contributors
11
Replies
12
Views
8 Years
Discussion Span
Last Post by Jacob777
0

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'
0

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   
---------------------------
0

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

0

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

0

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.

0

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

0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.