Hallo Andre,
ich hoffe du konntest dein Problem lösen.
Delphi-Quellcode:
function WB_ClickLink(WB: TWebbrowser; const LinkText: string): Boolean;
var
HTMLDocument2: IHTMLDocument2;
Element: IHTMLElement;
I: Integer;
begin
HTMLDocument2 := WB.Document as IHTMLDocument2;
for I := 0 to HTMLDocument2.Links.Length - 1 do
begin
Element := HTMLDocument2.Links.Item(I, 0) as IHTMLElement;
if {Masks.}MatchesMask(Element.innerText, LinkText) then
begin
Result := True;
Element.Click;
Exit;
end;
end;
Result := False;
end;
Freundliche Grüße