Home > Back-end >  Taobao login problem click log in
Taobao login problem click log in

Time:10-09

 procedure TForm1. Button2Click (Sender: TObject); 
Var
Doc: IHTMLDocument2;
Denglu: OleVariant;
The begin
Tag:=0;
WebBrowser1. Navigate (' https://login.taobao.com ');
While (tag=0) do Application. ProcessMessages;
WebBrowser1. Oleobject. Document. Body. Scroll:='no';
Sleep (1000);
Try
Doc:=WebBrowser1. Document as IHTMLDocument2;
If doc=nil then Exit;
Denglu:=doc. All. The item (' TPL_username_1, 0) as IHTMLElement2;
Denglu. Value:=edit1. Text;//for the text box assignment
Denglu:=doc. All. The item (' TPL_password_1, 0) as IHTMLElement2;
Denglu. Value:=edit2. Text;//for the text box assignment
Denglu:=doc. All. The item (' J_SubmitDynamic, 0) as IHTMLElement2;
Denglu. Click;//click on the button, submit the form
Except,
//form1. Show;
//close;
end;
end;


Help everybody to see how to move the mouse to click edit box or a login button, will give code:
Thank you very much!

CodePudding user response:

The ultimate way is made with Indy HTTP
  • Related