Solved

delphi embbebed Web Browser Help - CLICK IN RADIO BUTTONS

Posted on 2010-08-28
4
1,177 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article will show, step by step, how to integrate R code into a R Sweave document
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

839 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