
15.04.2013, 20:10
|
Начинающий
|
|
Регистрация: 16.03.2013
Сообщения: 151
Версия Delphi: Delphi 2010
Репутация: 10
|
|
Попробуй так:
Код:
procedure TForm1.Button1Click(Sender: TObject);
var
Doc: IHTMLDocument2;
Buttons: IHTMLElementCollection;
Button: IHTMLElement;
i: Integer;
begin
Doc := WebBrowser1.Document as IHTMLDocument2;
Buttons := Doc.all.tags('INPUT') as IHTMLElementCollection;
for i := 0 to Inputs.length - 1 do
begin
Button := Inputs.item(i, EmptyParam) as IHTMLElement;
if AnsiSameText(Trim(Input.innerText), 'Текст кнопки') then
begin
Input.click;
Break;
end;
end;
end;
|