Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Click in web page button without mouse

Posted on 2012-04-10
2
Medium Priority
?
701 Views
Last Modified: 2012-04-10
Thank you for help.
Iam using delphi XE.
and have the button in web page with this code
<input value="Send This" type="submit">

Open in new window


how do i click in this web button using TWEBBROWSER?
any trick?

thank you.
0
Comment
Question by:adminmember
2 Comments
 
LVL 23

Accepted Solution

by:
Ferruccio Accalai earned 2000 total points
ID: 37830095
procedure TForm1.Click;
var
  ovElements: OleVariant;
  i: Integer;
begin
  ovElements := WebBrowser1.OleObject.Document.forms.item(0).elements;
  for i := 0 to (ovElements.Length - 1) do
    if (ovElements.item(i).tagName = 'INPUT') and
      (ovElements.item(i).type = 'SUBMIT') and
      (ovElements.item(i).Value = 'Send This') then
   begin
      ovElements.item(i).Click;
      break;
   end;
end;
0
 

Author Closing Comment

by:adminmember
ID: 37830550
ps: the submit is lowercase.
and now its works...
Thank You a lot.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question