-
Posts
13 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Mendes's Achievements

Seeker (1/7)
0
Reputation
-
Hi mLipok, it is reloaded, in the same manner it whould if you submited a form and got a confirmation page, however you get a page where you have to agree to the (for lack of a better word "EULA") info submited with a checkbox. Let me give you some printscreens (i am sorry for the yellow parts it contains private info) First image (1.gif) with black circle where i use the _IELinkClickByText($oIE, "submit link") Second image (2.gif) with red circle where i whant to check the checkbox
-
First of all i am sorry for this, it may be a kind of a repost, i had a topic going with this subject but it started with something else and i was reading it in order to re-think the problem and found that it was somewhat confusing. So i am creating a new topic previous one was Basicaly I have a problem with a check box, This is what i do: I load a webpage with IEcreate assigning to $oIE Then i assign to $oforms the forms in that page Then i pick a field in $oforms[1] (lets call it field[1] and insert a value into it. Then i submit the form Since i can't submit the form because it uses javascript in a link i use _IELinkClickByText($oIE, "LINKTOSUBMIT") I print out the information of those forms for debugging purposes Local $oIE = _IECreate("website.example.com") Local $oForms = _IEFormGetCollection($oIE) local $leilaocod local $i For $oForm In $oForms ConsoleWrite ("Form Info : " & $oForm.name & @CRLF) $oelements = _IEFormElementGetCollection($oform) For $oelement In $oelements if $oelement.name = "" then $oelement.name = "*********" ConsoleWrite (" Element Info | Name : " & $oelement.name & " Type : " & $oelement.Type & " Value : " & $oelement.Value & @CRLF) if $oelement.name = "leilaoCod" then $leilaocod = $oelement.value if $oelement.name = "valorLicitar" then _IEFormElementSetValue($oelement, 1337) _IELinkClickByText($oIE, "submit link") _IELoadWait ($oIE) ;condicoesclick() EndIf Next Next Printout : The page loads into a new page (because i just cliked the link) and i have a check box there. i try then checking the checkbox Local $oForm1 = _IEFormGetObjByName($oIE, "formulario") _IEFormElementCheckBoxSelect($oForm1,"1", "condicao", 1, "byValue") Nothing happens, and i figured well maybe the new forms aren't in the $oforms collection so i cant get it i decided then to repopulate the $oforms with Local $oForms = _IEFormGetCollection($oIE) For $oForm In $oForms ConsoleWrite ("Form Info : " & $oForm.name & @CRLF) $oelements = _IEFormElementGetCollection($oform) For $oelement In $oelements ConsoleWrite (" Element Info | Name : " & $oelement.name & " Type : " & $oelement.Type & " Value : " & $oelement.Value & @CRLF) ; EndIf Next Next I get the same print out I am gessing that my $oIE object still has the previous page elements (so no new form and no checkbox there ) How can i use Local $oForm1 = _IEFormGetObjByName($oIE, "formulario") _IEFormElementCheckBoxSelect($oForm1,"1", "condicao", 1, "byValue") Or how can i load the page elements to the $oIE if the new page was generated after a _IELinkClickByText($oIE, "link") Anyway when i try checking the box i get a ... And i get a IE.au3 T3.0-2 Warning from function _IEFormElementCheckBoxSelect, $_IESTATUS_NoMatch
-
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
mLipok, after some deserved hollidays i am back at it. Even if the expression was wrong it still doesn't work. I don't know how to better explain the problem but i will try to deconstruct it. I load a webpage with IEcreate assigning to $oIE Then i assign to $oforms the forms in that page Then i pick a field in $oforms[1] (lets call it field[1] and insert a value into it. Since i cant submit the form because it uses javascript in a link i use _IELinkClickByText($oIE, "LINKTOSUBMIT") The page loads into a new page (because i just cliked the link) and i have a check box there However this time my $oIE ofcourse still has the previous page elements (so no checkbox there ) How can i use Local $oForm1 = _IEFormGetObjByName($oIE, "formulario") _IEFormElementCheckBoxSelect($oForm1,"1", "condicao", 1, "byValue") if the element isn't there..... #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("http://website.example") Local $oForms = _IEFormGetCollection($oIE) local $leilaocod local $i For $oForm In $oForms ConsoleWrite ("Form Info : " & $oForm.name & @CRLF) $oelements = _IEFormElementGetCollection($oform) For $oelement In $oelements if $oelement.name = "" then $oelement.name = "*********" ConsoleWrite ("Element Info | Name : " & $oelement.name & " Type : " & $oelement.Type & " Value : " & $oelement.Value & @CRLF) if $oelement.name = "leilaoCod" then $leilaocod = $oelement.value if $oelement.name = "valorLicitar" then _IEFormElementSetValue($oelement, 11113) _IELinkClickByText($oIE, "linktosubmit") _IELoadWait ($oIE) ;condicoesclick() EndIf Next Next func condicoesclick() #cs ;Dirty way ... hate sending tabs sleep (1000) While $i <29 sleep(10) Send("{TAB}") $i = $i +1 Wend Send("{SPACE}") #ce Local $oForm1 = _IEFormGetObjByName($oIE, "formulario") _IEFormElementCheckBoxSelect($oForm1,"1", "condicao", 1, "byValue") EndFunc And i get a IE.au3 T3.0-2 Warning from function _IEFormElementCheckBoxSelect, $_IESTATUS_NoMatch -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
Thank you mLipok, i am not seeing it right now, i have to get to the code but will check it as soon as i can. RyukShini, The navigate wont work since i get to the second webpage by clicking a link. -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
Ye shure, but the problem is not the checkbox code, it is that the _oIE object does not refresh. I cant even get the form where the check box is using _IEFormGetObjByName($oIE, "formulario")i keep getting the forms on the previous page.the ones that where present before i used the _IELinkClickByText($oIE, "Checkbox") checkbox code : <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condições de licitação." value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condições de licitação.</label> -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
Ye shure, but the problem is not the checkbox code, it is that the _oIE object does not refresh. I cant even get the form where the check box is using _IEFormGetObjByName($oIE, "formulario")i keep getting the forms on the previous page.the ones that where present before i used the _IELinkClickByText($oIE, "Checkbox") checkbox code : <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condições de licitação." value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condições de licitação.</label> -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
Ye shure, but the problem is not the checkbox code, it is that the _oIE object does not refresh. I cant even get the form where the check box is using _IEFormGetObjByName($oIE, "formulario")i keep getting the forms on the previous page.the ones that where present before i used the _IELinkClickByText($oIE, "Checkbox") checkbox code : <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condições de licitação." value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condições de licitação.</label> -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
Thanks, i have been killing myself over this darn checkbox all day... If it helps here is the html source where the checkbox is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="pt"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="author" content="DGITA / Opensoft"> <meta name="description" content = "PORTAL DAS FINANÇAS"> <meta name="keywords" content = "AT Autoridade Tributária Aduaneira Finanças"> <meta name="language" content = "PT"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Portal das Finanças</title> <script > function post(body) { document.dummyForm.body.value = body; document.dummyForm.submit(); return false; } function postExternal(body) { document.dummyForm.action.value = body; document.dummyForm.submit(); return false; } function doThePFLoad() { window.name = 'PortalFinancas'; if (typeof onLoadBody == "function") { onLoadBody(); } } </script> <link rel="stylesheet" type="text/css" href="/pf/styles/external.css" /> <link rel="stylesheet" type="text/css" href="/pf/styles/dgci.css" /> <link rel="stylesheet" type="text/css" href="/pf/styles/print.css" media="print" /> <link rel="stylesheet" type="text/css" href="/pf/styles/pf.css" /> <link rel="stylesheet" type="text/css" href="/pf/styles/aural.css" media="aural" /> <!--[if IE 7]> <style type="text/css" media="all"> select { height: 21px !important; } #paginacaoPG td.paginas { text-align: center !important; } .goldButton { font-size: 10px !important; font-family: Trebuchet MS; line-height: 12px; height: 18px; background: url(/pf/img/btn1_middle.gif) left top repeat-x !important; padding-top: 3px; color: #ffffff !important; font-weight: bold; vertical-align: middle; text-transform: uppercase; border: none; float: left; display: inline; cursor: pointer; } </style> <![endif]--> <!--[if lt IE 9]> <style type="text/css" media="all"> #agendaDiv{ width: 179px; } </style> <![endif]--> <!--[if lt IE 7]> <script defer type="text/javascript" src="/pf/js/pngfix.js"></script> <![endif]--> <script type="text/javascript" src="/pf/js/janelas.js"></script> <script type="text/javascript" src="/pf/js/images.js"></script> <script type="text/javascript" src="/pf/js/validation.js"></script> <script type="text/javascript" src="/pf/js/prototype.js"></script> <script type="text/javascript" src="/pf/js/auto-validation.js"></script> <script type="text/javascript" src="/pf/js/overlib.js"></script> <script type="text/javascript" src="/pf/js/functions.js"></script> </head> <body onload="doThePFLoad()"> <form name="dummyForm" method="post" action="main.jsp"><input type="hidden" name="body" value="" /></form> <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div> <table id="main_Table" cellpadding="0" cellspacing="0"> <tr> <td class="left_margin"><img src="/pf/img/pixel.gif" height="500" width="2" alt="" title="" /></td> <td class="conteudo" valign="top"> <!-- HEADER--> <script> function getFormatedYar(number) { return (number < 1000) ? number + 1900 : number; } function getFormatedDate(){ var now = new Date(); var days = new Array( 'Domingo','Segunda-feira','Terça-feira', 'Quarta-feira','Quinta-feira','Sexta-feira','Sábado'); var months = new Array( 'janeiro','fevereiro','março','abril','maio', 'junho','julho','agosto','setembro','outubro', 'novembro','dezembro'); var date = ((now.getDate()<10) ? "0" : "")+ now.getDate(); today = days[now.getDay()] + ", " + date + " " + months[now.getMonth()] + " " + (getFormatedYar(now.getYear())); document.write(today); } </script> <form action="/pesquisar.action" method="get" accept-charset="UTF-8" name="pesquisarForm" id="pesquisarForm"> <table cellpadding="0" cellspacing="0" id="header"> <tr> <td class="left"><script>getFormatedDate()</script></td> <td class="separador"><img src="/pf/img/pixel.gif" height="1" width="1" alt="" title=""/></td> <td class="right"> <table cellpadding="0" cellspacing="0"> <tr> <td><h1 class="pageTitle">Portal das Finanças</h1></td> <!-- <td class="fontSize">Tamanho de letra</td> <td class="fontSize_img"><a href="novaFuncionalidade2Fase.action"><img src="/pf/img/Aa+.gif" alt="aumentar" title="aumentar" /></a><img src="/pf/img/pixel.gif" width="1" height="1" alt="" title="" /><a href="novaFuncionalidade2Fase.action"><img src="/pf/img/Aa-.gif" alt="diminuir" title="diminuir" /></a></td> --> <!--<td class="pesquisa">--> <!--<label for="pesquisa">Pesquisa</label>--> <!--<input type="text" class="main-search-input" value="Indique aqui o que pretende efetuar (ex: Pagar IUC)" id="pesquisa" name="query" onclick="searchPlaceholder(this);"/>--> <!--<input type="hidden" name="e" value="˜">--> <!--</td>--> <!--<td>--> <!--<button title="Pesquisar" id="pesquisabtn" type="submit" class="search">OK</button>--> <!--</td>--> </tr> </table> </td> <td class="header-middle-center logout-header"> <a href="consultarMensagens.action" target="_top">Mensagens (0)</a> </td> <td class="header-middle-center logout-header"><a href="/menu.action?pai=660" target="_top">Dados Pessoais</a></td> <td class="header-middle-center logout-header"> <a href="/pt/logoutSA.action" target=_top>Sair</a></td> </tr> </table> </form> <!-- CONTEUDO --> <table cellpadding="0" cellspacing="0" id="main_area"> <tr> <td class="logoAT"> <a href="/"> <img src="/pf/img/logo-at.svg"onerror="this.onerror=null; this.src='/pf/img/logo-at.png'" alt="Autoridade Tributária e Aduaneira" title="Autoridade Tributária e Aduaneira" width="170" /> </a> </td> <td colspan="2" id="main-search-td"> <div class="main-search"> <form action="/pesquisar.action" method="get" accept-charset="UTF-8"> <input type="search" name="query" class="main-search-input" placeholder="Indique aqui o que pretende efetuar (ex: Pagar IUC)" > <input type="hidden" name="e" value="?"> <input type="submit" class="main-search-submit" tabindex="-1" value="Pesquisar"> </form> </div> </td> </tr> <tr style="height: 6px;"></tr> <tr> <td class="top_left"> <!-- MENU --> <table cellpadding="0" cellspacing="0" id="menu"> <tr> <td class="margin"> </td> <td class="left" align="left"> <!-- menu --> <table cellpadding="0" cellspacing="0" class="menu" border="0"> <tr><td class="top"><a href="http://info.portaldasfinancas.gov.pt/pt/at/at_index.htm">A AT</a></td></tr> <tr> <td><a href="http://info.portaldasfinancas.gov.pt/pt/dgci/dgci_youtube/">A AT no Youtube</a></td> </tr> <tr> <td><a href="http://twitter.com/Aut_Trib_Adua" target="_blank">A AT no Twitter</a></td> </tr> <tr><td><a href="/actualidade.action">Atualidade</a></td></tr> <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/">Apoio ao Contribuinte</a></td></tr> <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/informacao_fiscal/">Informação Fiscal</a></td></tr> <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/dgci/divulgacao/estatisticas/">Estatísticas</a></td></tr> <tr><td><a href="/servicos.action">Serviços Tributários</a></td></tr> <tr><td><a href="https://aduaneiro.portaldasfinancas.gov.pt/">Serviços Aduaneiros</a></td></tr> <tr><td><a href="/menu.action?pai=348">Downloads</a></td></tr> <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/divulgacao/outros_links.htm">Ligações a Sítios</a></td></tr> <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/docs/Conteudos_1pagina/NEWS_Portuguese_Tax_System.htm" >Portuguese Tax System</a></td></tr> </table> <!-- outros servicos --> <!-- Serviço em destaque --> <table cellpadding="0" cellspacing="0" id="servicoDestaque"> <tr> <td class="middle textcenter"> <a href="https://faturas.portaldasfinancas.gov.pt/" target="ServicoDestaque" > <img src="/pf/img/logo-fatura.png" alt="Serviço em destaque: E-Fatura" title="Serviço em destaque: E-Fatura"/> </a> </td> <td class="margin"><img src="/pf/img/pixel.gif" alt="" title="" /></td> </tr> <tr class="space_agenda_fiscal"> <td class="bottom_left"><img src="/pf/img/menuBox_cantoBottomLeft.gif" alt="" title=""/></td> <td class="bottom_right"><img src="/pf/img/menuBox_cantoBottomRight.gif" alt="" title=""/></td> </tr> <tr> <td class="agenda_border"> <span class="title"><a class="title_agenda" href="calendario.action" target="_top">Agenda Fiscal</a></span> </td> </tr> </table> <!-- proximos servicos --> <!-- banner --> <!-- <table cellpadding="0" cellspacing="0" id="banner"> <tr> <td class="top_left"><img src="/pf/img/menuBox_cantoTopLeft.gif" alt="" title=""/></td> <td class="middle"></td> <td class="top_right"><img src="/pf/img/menuBox_cantoTopRight.gif" alt="" title="" /></td> </tr> <tr> <td class="margin"><img src="/pf/img/pixel.gif" alt="" title="" /></td> <td class="middle"> <a href="desconhecida.action"><img src="/pf/img/banner_educacaoFiscal.gif" alt="Educação Fiscal" title="Educação Fiscal" /></a> </td> <td class="margin"><img src="/pf/img/pixel.gif" alt="" title="" /></td> </tr> <tr> <td class="bottom_left"><img src="/pf/img/menuBox_cantoBottomLeft.gif" alt="" title=""/></td> <td class="middle"></td> <td class="bottom_right"><img src="/pf/img/menuBox_cantoBottomRight.gif" alt="" title=""/></td> </tr> </table> --> <!-- Agenda --> <!-- agenda fiscal --> </td> <td class="margin"> </td> </tr> </table> </td> <td id="main_middle_body" class="middle middle-correct" rowspan="2" valign="top"> <!-- conteudo central --> <div class="bodyBox mainBody"> <div class="inlineDivReset"></div> <div class="bodyBoxInnerElement"> <!-- BREADCRUMBS --> <p> <table cellpadding="0" cellspacing="0" id="breadcrumbs"> <tr> <td> <span>Você está aqui</span> <span class="home"><a href="/home.action">Início</a></span> <a href="/inicio.action">Os Seus Serviços</a> <!-- from here --> <a href="/pt/menu.action?pai=256&segId=CD" title="Outros Serviços">Outros Serviços</a> <a href="/pt/menu.action?pai=807&segId=CD" title="Venda Electrónica de Bens">Venda Electrónica de Bens</a> <a href="/pt/main.jsp?body=/external/slelei/SLELEI/listaLeiloes.htm" title="Leilão Electrónico">Leilão Electrónico</a> </td> </tr> <tr><td class="hr"><img src="/pf/img/pixel.gif" width="1" height="1" alt="" title="" /></td></tr> </table> </p> <script> function getBreadCrumbsAditionalInfoParentId () { return "807"; } function getBreadCrumbsAditionalInfoParentSegmentId () { return "CD"; } function getBreadCrumbsAditionalInfoBreadCrumbSize() { return 3; } </script> <div class="user_info_printable"> </div> </div> <div class="bodyBoxInnerElement"> <table width="100%"><tr><td> <script language="javascript"> function onLoadBody() { } function toNum(valor) { var x = ''; if (valor != null && valor != '') { if (valor.indexOf('.') > -1) { var pos = valor.indexOf('.'); if (valor.indexOf(',')==-1) { x = valor; } else { while(pos != -1) { x = x.concat(valor.substring(0, pos)); valor = valor.substring(pos+1); pos = valor.indexOf('.'); } x = x.concat(valor); } } else { x = valor; } x = x.replace(/,/g, '.'); return parseFloat(x); } else { return 0.0; } } function licitarLeilao(){ var ultimaLicitacao = document.getElementById('ultimaLicitacao').value; var valorLicitar = document.getElementById('valorLicitar').value; if(ultimaLicitacao == ' -- '){ ultimaLicitacao = document.getElementById('valorBase').value; } var racio = toNum(valorLicitar) / toNum(ultimaLicitacao); if (racio < 1.5) { if(!confirm('Confirma o valor de licitação (' + valorLicitar +' eur.) do leilão?')){ return false; } } else { if(!confirm('ATENÇÃO!! O valor de licitação é muito superior à última licitação. \n\n Confirma o valor de licitação (' + valorLicitar +' eur.) do leilão?')){ return false; } } var flow = document.getElementById('flow'); flow.value = '8'; document.formulario.submit(); } function voltarLicitacao(){ var flow = document.getElementById('flow'); flow.value = '0'; document.formulario.submit(); } </script> <form name="formulario" method="post" action="main.jsp"> <input type="hidden" id="flow" name="flow" value=""/> <input type="hidden" id="ultimaLicitacao" name="ultimaLicitacao" value="470,00"/> <input type="hidden" id="valorBase" name="valorBase" value="70,00"/> <input type="hidden" id="leilaoCod" name="leilaoCod" value='0248.2015.126'/> <!-- # Inicio Cabeçalho Ecrã # --> <div class="whiteBox"> <div class="whiteBoxTopLeftCorner"></div> <div class="whiteBoxTop"></div> <div class="whiteBoxTopRightCorner"></div> <div class="inlineDivReset"></div> </div> <div class="whiteBoxLeft"> <div class="whiteBoxRight whiteBoxFont"> <div class="leilImgbreadCrumb"></div> <div> <h2 class="leilTitle"> <span>Licitação para o Leilão Electrónico</span> </h2> </div> </div> </div> <div class="whiteBox"> <div class="whiteBoxBottomLeftCorner"></div> <div class="whiteBoxBottom"></div> <div class="whiteBoxBottomRightCorner"></div> <div class="inlineDivReset"></div> </div> <!-- # Fim Cabeçalho Ecrã # --> <div class="whiteBox"> <div class="whiteBoxTopLeftCorner"></div> <div class="whiteBoxTop"></div> <div class="whiteBoxTopRightCorner"></div> <div class="inlineDivReset"></div> </div> <div class="whiteBoxLeft"> <div class="whiteBoxRight whiteBoxFont"> <span title="CONDIÇÕES DE LICITAÇÃO" class="titul">CONDIÇÕES DE LICITAÇÃO</span> <div class="hespaco"></div> <div class="hr"></div> <span class="txt">- Não podem ser adquirentes, por si, por interposta pessoa ou por entidade jurídica em que participem, os magistrados e os funcionários da Administração Tributária [256.º/1/a) CPPT];</span> <span class="txt"><br>- Não podem ser adquirentes entidades não residentes submetidas a um regime fiscal claramente mais favorável ou aquelas cujos regimes jurídicos não permitam identificar os titulares efetivos do capital [256.º/1/b) CPPT];</span> <span class="txt"><br>- Só serão aceites propostas de valor igual ou superior ao valor base de venda. Se já existirem propostas entregues para esta venda, só serão aceites propostas de valor superior ao da última licitação;</span> <span class="txt"><br>- As propostas, uma vez apresentadas, só podem ser retiradas se a sua abertura for adiada por mais de noventa dias depois do primeiro designado (820.º/4 CPC);</span> <span class="txt"><br>- Após fim do leilão deverá consultar o seu resultado neste Portal das Finanças, de forma a poder cumprir com o prazo de pagamento [256.º/1/e)/f) CPPT].</span> <div class="hr"></div> <div class="leilDualHespaco"></div> <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condições de licitação." value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condições de licitação.</label> </div> </div> <div class="whiteBox"> <div class="whiteBoxBottomLeftCorner"></div> <div class="whiteBoxBottom"></div> <div class="whiteBoxBottomRightCorner"></div> <div class="inlineDivReset"></div> </div> <div class="blueBox"> <div class="blueBoxTopLeftCorner"></div> <div class="blueBoxTop"></div> <div class="blueBoxTopRightCorner"></div> <div class="inlineDivReset"></div> </div> <div class="blueBoxLeft"> <div class="blueBoxRight blueBoxFont"> <div class="blueBoxBody"> <span title="REGISTAR LICITAÇÃO" class="titul">CONFIRMAR LICITAÇÃO</span> <div class="hr"></div> <div class="hespaco"></div> <div class="divFormSubmitConsulta"> <label class="blueBoxInputLabel" for="valorLicitar">Valor de Licitação</label><br/> <input type="text" id="valorLicitar" name='valorLicitar' class="blueBoxInput" size="14" maxlength="14" value='471,00'/> </div> <div class="leilDualHespaco"></div> <!-- START BUTTON --> <!-- ENABLED BUTTON --> <table id="botao" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: inline;"> <tbody> <tr> <td class="left"> <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> <td class="middle"> <a href="#" title="Licitar" onclick="javascript:return licitarLeilao();"><span class="">Licitar</span></a> </td> <td class="right"> <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> </tr> </tbody> </table> <!-- DISABLED BUTTON --> <table id="botaoDisabled" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: none;"> <tbody> <tr> <td class="left"> <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> <td class="middle"> <span class="">Licitar</span> </td> <td class="right"> <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> </tr> </tbody> </table> <!-- END BUTTON --> </div> </div> </div> <div class="blueBox"> <div class="blueBoxBottomLeftCorner"></div> <div class="blueBoxBottom"></div> <div class="blueBoxBottomRightCorner"></div> <div class="inlineDivReset"></div> </div> <input name="body" type="hidden" value="/external/slelei/SLELEI/licitarLeilao.htm"/> <!-- zona informativa do leilão --> <div class="whiteBox"> <div class="whiteBoxTopLeftCorner"></div> <div class="whiteBoxTop"></div> <div class="whiteBoxTopRightCorner"></div> <div class="inlineDivReset"></div> </div> <div class="whiteBoxLeft"> <div class="whiteBoxRight whiteBoxFont"> <span title="INFORMAÇÃO DO LEILÃO" class="titul">INFORMAÇÃO DO LEILÃO </span> <div class="hespaco"></div> <div class="hr"></div> <div class="leilDualHespaco"></div> <div class="fieldTitleBold dvalueLeft"> <span>Código do Leilão</span> </div> <div class="dvalueRight fieldValue"> <span> 0248.2015.126 </span> </div> <div class="hespaco"></div> <div class="fieldTitleBold dvalueLeft"> <span>Localização</span> </div> <div class="dvalueRight fieldValue"> <span title="Distrito">BEJA </span> <span> / </span> <span title="Concelho">BEJA </span> <span> / </span> <span title="Freguesia">BEJA (SANTIAGO MAIOR E SÃO JOÃO BAPTISTA)</span> </div> <div class="hespaco"></div> <div class="fieldTitleBold dvalueLeft"> <span>Valor Base</span> </div> <div class="dvalueRight fieldValue"> <span> 70,00 € </span> </div> <div class="hespaco"></div> <div class="fieldTitleBold dvalueLeft"> <span>Última Licitação </span> </div> <div class="dvalueRight fieldValue"> <span> 470,00 € </span> </div> <div class="leilDualHespaco"></div> </div> </div> <div class="whiteBox"> <div class="whiteBoxBottomLeftCorner"></div> <div class="whiteBoxBottom"></div> <div class="whiteBoxBottomRightCorner"></div> <div class="inlineDivReset"></div> </div> <div> <span class="txt faqResposta"> Informação obtida em: 2016-01-08 00:12:44. </span> </div> <!-- Botão Voltar --> <div style="padding-left:477px;"> <!-- START BUTTON --> <!-- ENABLED BUTTON --> <table id="botao" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: inline;"> <tbody> <tr> <td class="left"> <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> <td class="middle"> <a href="#" title="Voltar à página anterior." onclick="javascript:return voltarLicitacao();"><span class="">Voltar</span></a> </td> <td class="right"> <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> </tr> </tbody> </table> <!-- DISABLED BUTTON --> <table id="botaoDisabled" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: none;"> <tbody> <tr> <td class="left"> <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> <td class="middle"> <span class="">Voltar</span> </td> <td class="right"> <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> </tr> </tbody> </table> <!-- END BUTTON --> </div> </form> <form name="formFooter" method="get" action="main.jsp"> <div class="hespaco"></div> <div class="whiteBox"> <div class="whiteBoxTopLeftCorner"></div> <div class="whiteBoxTop"></div> <div class="whiteBoxTopRightCorner"></div> <div class="inlineDivReset"></div> </div> <div class="whiteBoxLeft"> <div class="whiteBoxRight whiteBoxFont"> <div style="text-align: center;"> <img src="/pf/img/fwd_btn2.gif" alt="" title="" /> <a title="Ir para a gestão preferências" href="main.jsp?body=/external/slelei/SLELEI/preferencias.htm">Preferências</a> <img src="/pf/img/fwd_btn2.gif" alt="" title="" /> <a title="Ir para a gestão alertas" href="main.jsp?body=/external/slelei/SLELEI/alertas.htm">Alertas</a> <img src="/pf/img/fwd_btn2.gif" alt="" title="" /> <a title="Ir para as perguntas frequentes" href="main.jsp?body=/external/slelei/SLELEI/faq.htm">Perguntas Frequentes</a> </div> </div> </div> <div class="whiteBox"> <div class="whiteBoxBottomLeftCorner"></div> <div class="whiteBoxBottom"></div> <div class="whiteBoxBottomRightCorner"></div> <div class="inlineDivReset"></div> </div> <input name="body" type="hidden" value=""/> </form> <!-- Acaba aqui a aplicação --></td></tr></table> </div> <div style="clear:both"></div> <div class="bodyBoxInnerElement"> </div> <div class="bodyBoxExpander"></div> </div> </td> <td class="right iframe_width iframe_height" rowspan="2" > <!-- LOGIN --> <iframe src="/pt/oSeuEspaco.action" marginwidth="0" marginheight="0" id="seuEspaco" frameborder="0" scrolling="no" class="iframe_width iframe_height"> </iframe> </td> </tr> </table> </td> <td class="right_margin" ><img src="/pf/img/pixel.gif" height="500" width="2" alt="" title="" /></td> </tr> <tr class="footer_tr template_main"> <td class="left_margin" ><img src="/pf/img/pixel.gif" width="2" alt="" title="" /></td> <td class="middle"> <!-- FOOTER --> <table cellpadding="0" cellspacing="0" id="footer"> <tr> <td id="footer_template" class="footer"> <!-- FOOTER --> <table cellpadding="0" cellspacing="0" class="footer"> <tr> <td><img src="/pf/img/pixel.gif" width="2" alt="" title="" /></td> <td class="middle"> <table cellspacing="0" cellpadding="0"> <tr> <td id="footer_left_menu" class="left"> <div class="col-width-50 pull-left"> <ul class=""> <li> <a href="http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/carta_do_utente.htm">Carta do Utente</a> </li> <li> <a href="http://info.portaldasfinancas.gov.pt/pt/dgci/missao/">Conheça a Autoridade Tributária e Aduaneira</a> </li> <li> <a href="http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/questoes_frequentes/">Questões Frequentes</a> </li> <li> <a href="http://info.portaldasfinancas.gov.pt/pt/dgci/divulgacao/estatisticas/">Estatísticas</a> </li> <li> <a href="http://info.portaldasfinancas.gov.pt/pt/quem_somos/privacidade/">Privacidade</a> </li> </ul> </div> <div id="footer_middle_menu" class="col-width-25 pull-left"> <span class="footer_title">Área Pessoal</span> <ul > <li> <a href="/menu.action?pai=660" target="_top" title="Dados Pessoais">Dados Pessoais</a> </li> <li> <a href="consultarMensagens.action" target="_top">Mensagens</a> </li> <li> <a href="/pt/logoutSA.action" target=_top>Sair</a> </li> </ul> </div> <div id="footer_right_menu" class="col-width-25 pull-left" > <ul > <li> <a href="http://www.w3.org/WAI/WCAG1AA-Conformance" target="_blank"> <img src="/pf/img/wcag1AA-blue.png" alt="Acessibilidade" title="Acessibilidade" height="31" width="88"/> </a> </li> </ul> </div> </td> </tr> <tr> <td class="atualizacao_footer">Última atualização em 2015-12-30 | 2.1.18.0553 | Autoridade Tributária e Aduaneira</td> </tr> </table> </td> <td class="right_margin"><img src="/pf/img/pixel.gif" height="20" width="2" alt="" title=""></td> </tr> </table> </td> </tr> </table> </td> <td class="right_margin" ><img src="/pf/img/pixel.gif" width="2" alt="" title="" /></td> </tr> </table> </body> </html> -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
I tried the linkclick function you sugest after a few failed attempts using the _IEFormGetObjByName($oIE, "formulario")No cookie there, it isn't a link it is a form object, and the linkclickbytext doesn't work. If needed i can try the tab, but i will be unable to hide the window if i do that, and it is a bit dirty But thanks for the sugestion it is indeed a last resource option. -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
I find myself in trouble again after i hit the link i have another webpage with another form, I have to check a checkbox there. however the $oIE object just didn't refresh so i cant invoke _IEformgetobjbyName because it simply isn't there. Local $oForms = _IEFormGetCollection($oIE) For $oForm In $oForms $oelements = _IEFormElementGetCollection($oform) For $oelement In $oelements if $oelement.name = "valorLicitar" then _IEFormElementSetValue($oelement, 466) Next Next _IELinkClickByText($oIE, "LICITAR") _IELoadWait ($oIE) ;by now the webpage has changed to the next step we need to check a box and press another link Local $oForm1 = _IEFormGetObjByName($oIE, "formulario") _IEFormElementCheckBoxSelect($oForm1, "condicao", "", 1, "byvalue"); Why cant i find the checkbox ???? -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
Ok i solved it by using _IELinkClickByText($oIE, "link") -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
The thing is that the form i am trying to submit doesn't have a element with the submit type, <a title="fubar" onclick="javascript:return clickfunction();" href="#"><span>fubar</span></a> -
_IEAction not submiting web form.
Mendes replied to Mendes's topic in AutoIt General Help and Support
Tried that, but it doesn't work. -
Hi, I am trying to submit a form using this code. #include <IE.au3> Local $oIE = _IECreate("http://www.somewebsite.com") ; Local $oForm1 = _IEFormGetCollection($oIE, 3) Local $oQuery1 = _IEFormElementGetCollection($oForm1, 5) _IEFormElementSetValue($oQuery1,155) Local $oSubmit = _IEGetObjByName($oQuery1, "botao") _IEAction($oSubmit, "click") Seems straight forward, i am using IEaction because of the javascript as stated in the manuals and online help, somehow after setting the value "155" in the form element i send a submit and nothing happens, i also dont get any error. I have also tryed setting focus to the object and same result, somehow i dont seem to get this Local $oSubmit = _IEGetObjByName($oQuery1, "botao") well defined. ( below is the source for the html form) <form name="formulario" method="post" action="main.jsp"> <input type="hidden" id="flow" name="flow" value=""/> <!-- # Inicio Cabeçalho Ecrã # --> <div class="whiteBox"> <div class="whiteBoxTopLeftCorner"></div> <div class="whiteBoxTop"></div> <div class="whiteBoxTopRightCorner"></div> <div class="inlineDivReset"></div> </div> <div class="whiteBoxLeft"> <div class="whiteBoxRight whiteBoxFont"> <div class="leilImgbreadCrumb"></div> <div> <h2 class="leilTitle"> <span>Detalhe do Leilão Eletrónico</span> </h2> </div> </div> </div> <div class="whiteBox"> <div class="whiteBoxBottomLeftCorner"></div> <div class="whiteBoxBottom"></div> <div class="whiteBoxBottomRightCorner"></div> <div class="inlineDivReset"></div> </div> <!-- # Fim Cabeçalho Ecrã # --> <input type="hidden" id="leilaoCod" name="leilaoCod" value='3085.2015.1187'/> <input type="hidden" id="servvend" name="servvend" value='3085'/> <input type="hidden" id="anovend" name="anovend" value='2015'/> <input type="hidden" id="numvend" name="numvend" value='1187'/> <div class="blueBox"> <div class="blueBoxTopLeftCorner"></div> <div class="blueBoxTop"></div> <div class="blueBoxTopRightCorner"></div> <div class="inlineDivReset"></div> </div> <div class="blueBoxLeft"> <div class="blueBoxRight blueBoxFont"> <div class="blueBoxBody"> <span title="REGISTAR LICITAÇÃO" class="titul">REGISTAR LICITAÇÃO</span> <div class="blueBoxHr"></div> <div class="inlineDivReset"></div> <div class="blueBoxCell"> <span class="blueBoxLabel">Valor de Licitação:</span> <br/> <span class="blueBoxLabel">(Ex: 250,00)</span> <br/> <input type="text" id="valorLicitar" class="blueBoxInput" name='valorLicitar' size="14" maxlength="14" value=''/> <br/> <br/> <!-- START BUTTON --> <!-- ENABLED BUTTON --> <table id="botao" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: inline;"> <tbody> <tr> <td class="left"> <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> <td class="middle"> <a href="#" title="Licitar" onclick="javascript:return licitarLeilao();"><span class="">Licitar</span></a> </td> <td class="right"> <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> </tr> </tbody> </table> <!-- DISABLED BUTTON --> <table id="botaoDisabled" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: none;"> <tbody> <tr> <td class="left"> <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> <td class="middle"> <span class="">Licitar</span> </td> <td class="right"> <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> </tr> </tbody> </table> <!-- END BUTTON --> </div> <div class="blueBoxInputCell" > <div class="divSituacPendente"></div> </div> <div class="blueBoxCell"> <span class="blueBoxLabel">Valor da Última Licitação:</span> <br/> <span class="blueBoxLabel"></span> <br/> <input type="text" id="valorLicitar" class="blueBoxInputDisabled" readOnly="readonly" size="14" maxlength="14" value='150,00' style="padding-bottom: 2px;"/> <br/> <br/> <!-- START BUTTON --> <!-- ENABLED BUTTON --> <table id="botao" name="botao" class="btn2" cellspacing="0" cellpadding="0" style="display: inline;"> <tbody> <tr> <td class="left"> <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> <td class="middle"> <a href="#" title="Actualizar" onclick="javascript:return actualizaUltimaLicitacao();"><span class="">Actualizar</span></a> </td> <td class="right"> <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> </tr> </tbody> </table> <!-- DISABLED BUTTON --> <table id="botaoDisabled" name="botao" class="btn2" cellspacing="0" cellpadding="0" style="display: none;"> <tbody> <tr> <td class="left"> <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> <td class="middle"> <span class="">Actualizar</span> </td> <td class="right"> <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/> </td> </tr> </tbody> </table> <!-- END BUTTON --> </div> <div class="inlineDivReset"></div> <div> <span class="txt faqResposta"> Informação obtida em: 2016-01-06 21:44:14. </span> </div> </div> </div> </div> <div class="blueBox"> <div class="blueBoxBottomLeftCorner"></div> <div class="blueBoxBottom"></div> <div class="blueBoxBottomRightCorner"></div> <div class="inlineDivReset"></div> </div>