Jump to content
Fórum Script Brasil
  • 0

Alguém Sabe Como Clicar Nesse Botão No Delphi ?


dr_747
 Share

Question

1 answer to this question

Recommended Posts

  • 0

exemplo

<input type='image' src='https://www.bcash.co...ao_carrinho.gif' value='Adicionar ao Carrinho' alt='Adicionar ao Carrinho' border='0' align='absbottom' /></td></tr></table></form>

procedure TForm1.Button2Click(Sender: TObject);
var  Elements: OleVariant;
  i: Integer;
begin
  // Evitar erros de Scripts
  WebBrowser1.Silent := true;

  Elements := WebBrowser1.OleObject.Document.forms.item(0).elements;

  for i := 0 to (Elements.Length -1) do
    begin

       if (Elements.item(i).tagName = 'INPUT') and
          (Elements.item(i).type = 'image') and
          (Elements.item(i).Value = 'Adicionar ao Carrinho') then
           Elements.item(i).Click;
    end;

end;

abraço

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.8k
    • Total Posts
      646.6k
×
×
  • Create New...