Цитата:
Сообщение от NumLock
вот пример:
-загружает http://ya.ru/
-вставляет в строку поиска текст из TEdit (по кнопке Open url & set string)
-жмет кнопку "Найти" (по кнопке Start search)
|
Слушай тоже самое вылетает ошибка Invalid variant operation
Зделал я вотак
Код:
procedure TForm1.Button3Click(Sender: TObject);
begin
WebBrowser.Navigate('http://www.vip-prom.net/');
end;
procedure TForm1.Button2Click(Sender: TObject);
var
Document2: IHTMLDocument2;
ElementCollection: IHTMLElementCollection;
i: Integer;
begin
Document2:=WebBrowser.Document as IHTMLDocument2;
ElementCollection:=Document2.all as IHTMLElementCollection;
for i:=0 to ElementCollection.length-1 do
if (ElementCollection.item(i, Null) as IHTMLElement).onclick='login(document);' then
(ElementCollection.item(i, Null) as IHTMLElement).click;
end;
Вотетот сайт
http://www.vip-prom.net/ только не на первой странице а там где водишь логин и пароль!