Home > Back-end >  Delphi automatic web operation # # online kneeling people
Delphi automatic web operation # # online kneeling people

Time:09-29

what do you want to be a Delphi operating web event simulation software, encountered a problem,
For example: & lt; A href="" & gt; How to trigger based on class and href & lt; a> The click event?



Online, such as cattle

CodePudding user response:

Simulate mouse and click, click send message

CodePudding user response:

Simulation of the mouse to click, however, it does not necessarily ah, the coordinates of

CodePudding user response:

Then simulation send click the link of the HTTP request

CodePudding user response:

Automatic login
[Delphi] view plaincopy
The individual frames of input
Var
O: Olevariant;
The begin
O:=WebBrowser. OleObject. Document. All. The item (' LoginUserID, 0);//find the login user name input box
O.v alue:='TEST';
O:=WebBrowser. Oleobject. Document. All. The item (" LoginPassword ", 0);//find the login password input box
='TEST' o.v alue:
The WebBrowser. Oleobject. Document. Forms. The Item (0, 0). Submit;//the first form submitted
{
O:=WebBrowser. Oleobject. Document. All. The item (the 'Login', 0);//or use specified submission form name
O. chua lick.//click operation, also can be the same operation to other objects
}
end;
Multiple frames of input, FrameIndex for Frame serial number
Var
O: Olevariant;
The begin
//find the login user name input box
O:=WebBrowser oleobject. Document. Documentelement. Document. Frames. The item (FrameIndex). The document. All the item (' LoginUserID, 0);
O.v alue:='TEST';
//find the login password input box
O:=WebBrowser oleobject. Document. Documentelement. Document. Frames. The item (FramIndex). The document. All the item (" LoginPassword ", 0);
='TEST' o.v alue:
//the first form submitted
WebBrowser. Oleobject. Document. The documentelement. Document. Frames. The item (FramIndex). The document. The Forms. The item (0, 0). Submit;
{
//or use specified submission form name
O:=WebBrowser oleobject. Document. Documentelement. Document. Frames. The item (FramIndex.). Document. All. The item (the 'Login', 0);
O. chua lick.//click operation, also can be the same operation to other objects
}
end;

CodePudding user response:

Use A loop, as if DOC. ALL the ITEM, find the A, studying INNERHTML, look at its CLASS and HREF, is looking for yourself, just CLICK

CodePudding user response:

Use A loop, as if DOC. ALL the ITEM, find the A, studying INNERHTML, look at its CLASS and HREF, is looking for yourself, just CLICK

CodePudding user response:

Use A loop, as if DOC. ALL the ITEM, find the A, studying INNERHTML, look at its CLASS and HREF, is looking for yourself, just CLICK

CodePudding user response:

Is similar to use the software instead of the web page manually?
Seek counsel with!

CodePudding user response:

In javascript, basic want to web site what to do can do

CodePudding user response:

First get a label IHTMLElement, through IHTMLElement className attribute access to class
Converts the IHTMLElement IHTMLAnchorElement, through the href attribute to obtain IHTMLAnchorElement, finally click execute IHTMLElement
  • Related