Solved

delphi embbebed Web Browser Help - CLICK IN RADIO BUTTONS

Posted on 2010-08-28
4
1,162 Views
Last Modified: 2012-05-10
I AM NEED CLICK IN RADIO BUTTONS WITH EMBBEDDED, FOR CLICK IN NORMAL BUTTONS I AM USE
EmbeddedWB1.OleObject.Document.all.Item('setaFilho1', 0).click; AND SUCCESS AND WHEN I TRY WITH ID OF RADIO BUTTONS THE BUTTON NOT SUCCESS CLICK. PLEASE HELP ME.
0
Comment
Question by:thaiskis
  • 2
4 Comments
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 33550514
does the radio button have an id ?

have you found it in the source of the site ?
0
 

Author Comment

by:thaiskis
ID: 33550808
the html of the radio is

<input type="radio" onselect="alteraCampo('cpf','cnpj');" onclick="alteraCampo('cpf','cnpj');" tabindex="7" value="2" name="indicadorPessoa" checked="checked">
<input type="radio" onselect="alteraCampo('cpf','cnpj');" onclick="alteraCampo('cpf','cnpj');" tabindex="7" value="2" name="indicadorPessoa" checked="checked">

and frined i am need select using embbedded this html, i trying using code of click button and not work, please help me

<select class="valor" style="text-align: left;" tabindex="10" name="finalidade"><option value="01">Crédito em conta corrente</option>
<option value="02">Pagamento aluguel/condomínios</option>
<option value="03">Pagamento duplicatas/títulos</option>
<option value="04">Pagamento dividendos</option>
<option value="05">Pagamento mensalidades escolares</option>
<option value="06">Pagamento salários</option>
<option value="07">Pagamento a fornecedores</option>
<option value="08">Operação câmbio/fundos/bolsa valores</option>
<option value="09">Repasse arrecadação/pagamento de tributos</option>
<option value="10">Transferência internacional em reais</option>
<option value="11">Crédito em conta de poupança</option>
<option value="23">Pagamento de bolsa auxílio</option>
<option value="24">Remuneração a cooperado</option>
<option value="25">Pagamento de honorários</option>
<option value="26">Pagamento de prebenda</option>
<option value="99">Outros</option></select>
0
 
LVL 13

Expert Comment

by:aflarin
ID: 33551872
try this

  EmbeddedWB1.OleObject.Document.all.Item('indicadorPessoa', 0).click;

is it working?

you have two radio buttons with the same name - indicadorPessoa
so you can't select the second button by the name. if it's your html code, I suggest you to change the second name of the button like this:

<input type="radio" onselect="alteraCampo('cpf','cnpj');" onclick="alteraCampo('cpf','cnpj');" tabindex="7" value="2" name="indicadorPessoa1" checked="checked">
<input type="radio" onselect="alteraCampo('cpf','cnpj');" onclick="alteraCampo('cpf','cnpj');" tabindex="7" value="2" name="indicadorPessoa2" checked="checked">
then you'll be able to click on the first button
EmbeddedWB1.OleObject.Document.all.Item('indicadorPessoa1', 0).click;


and the second button:
EmbeddedWB1.OleObject.Document.all.Item('indicadorPessoa2', 0).click;





0
 
LVL 13

Accepted Solution

by:
aflarin earned 500 total points
ID: 33551889
btw try this code, it should work:

for the first button:
  EmbeddedWB1.OleObject.Document.all.Item('indicadorPessoa', 0).click;

for the second button:
  EmbeddedWB1.OleObject.Document.all.Item('indicadorPessoa', 1).click;
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question