In this case, I use my WB_send_Click_by_Value procedure:
procedure WB_send_Click_by_Value(WB: TWebbrowser;form_nr:nativeint;tag,typ,val: string);
var ovElements: OleVariant;
i: Integer;
begin
ovElements := WB.OleObject.Document.forms.item(form_nr).elements;
for i := 0 to (ovElements.Length - 1) do
begin
if AnsiSameText(ovElements.item(i).tagName,tag) and
AnsiSameText(ovElements.item(i).type,typ) and
AnsiSameText(ovElements.item(i).value,val) then
ovElements.item(i).Click;
end;
end;
I use this procedure for buttons in WebPage Formular 1, for example:
WB_send_Click_by_Value(Webbrowser1,0,'input','submit','ok');
or, for example, for RadioButtons in form 2, for example:
WB_send_Click_by_Value(Webbrowser1,1,'input','radio','dns');
source
share