• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

IE and delphi

Hi Experts,

How can I in delphi write in a textarea  in an IE window and pressing a link

Exist some way to do this, I can not use the delphi TWebBrowser, I have to do it directly in IE window

Thx for some help
0
alpires
Asked:
alpires
  • 2
1 Solution
 
8080_DiverCommented:
I'll have to take a look at an app I developed at work but I can give you the essence of the process.
You have to be able to identify the text area in the HTML before you can write to it and you also have to identify the link before you can "click" on it.
I'll provide more information tomorrow. ;-)
0
 
8080_DiverCommented:
Okay, I found the code (see below).
In the code snippet labelled {Basic information}, you see what you need to find in the html, how to set the value, and then what you need to find and 'click'.  (This snippet is from an app that access the TxDoT web site to verify VIN information.)
The declaration of the fHTMLElement is as follows:
 fHtmlElement    : IHtmlElement;

    {Basic information}
    TempResult  :=  FindElement('input','name=vin_1');
    if TempResult
    then begin
      fHtmlElement.setAttribute('value',VIN,0);
      if FindElement('input','type=submit')
      then begin
        fHtmlElement.click;
      end; {if}
    end; {if}

Open in new window

0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now