ich tests mal eben.
--
hm sieht so aus das es an den <div> tags liegt
das es deswegen nicht geht. muss mal gucken ob ich dafür ne lösung
hinbekomme.
---
liegt nicht an den divs, habn fehler drin gehabt. obwohls sonst irgendwie immer ging
komisch. naja hier die überarbeitete version:
Delphi-Quellcode:
PROCEDURE ClickOnButton(WebBrowser1:TWebBrowser; BT_text:STRING);
VAR
ovElements,ovFrames: OleVariant;
i,j,k: Integer;
BEGIN
IF Webbrowser1.OleObject.Document.Frames.Length > 1 THEN
BEGIN
ovFrames := Webbrowser1.OleObject.Document.Frames;
FOR j := 0 TO (ovFrames.Length - 1) DO
FOR k := 0 TO (ovFrames.Item(j).Document.Forms.Length - 1) DO
BEGIN
ovElements := ovFrames.Item(j).Document.Forms.Item(k).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 = BT_text)) THEN
ovElements.Item(i).Click;
END;
END
ELSE
BEGIN
FOR j := 0 TO (WebBrowser1.OleObject.Document.forms.Length - 1) DO
BEGIN
ovElements := WebBrowser1.OleObject.Document.forms.item(j).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 = BT_text)) THEN
ovElements.item(i).Click;
END;
END;
END;
PROCEDURE FillYourInput(WebBrowser1:TWebBrowser; name,text:STRING);
VAR i,j,k: Integer;
ovElements,ovFrames: OleVariant;
BEGIN
IF Webbrowser1.OleObject.Document.Frames.Length > 1 THEN
BEGIN
ovFrames := Webbrowser1.OleObject.Document.Frames;
FOR j := 0 TO (ovFrames.Length - 1) DO
FOR k := 0 TO (ovFrames.Item(j).Document.Forms.Length - 1) DO
BEGIN
ovElements := ovFrames.Item(j).Document.Forms.Item(k).elements;
FOR i := 0 TO (ovElements.Length - 1) DO
IF ((ovElements.Item(i).tagName = 'INPUT')
AND (ovElements.Item(i).name = name)) THEN
ovElements.Item(i).value := text;
END;
END
ELSE
BEGIN
FOR j := 0 TO (WebBrowser1.OleObject.Document.forms.Length - 1) DO
BEGIN
ovElements := WebBrowser1.OleObject.Document.forms.item(j).elements;
FOR i := 0 TO (ovElements.Length - 1) DO
IF ((ovElements.Item(i).tagName = 'INPUT')
AND (ovElements.Item(i).name = name)) THEN
ovElements.Item(i).value := text;
END;
END;
END;
sollte jetzt klappen, also bei mir gings
mfg emploi