zekasan Posted May 7, 2018 Report Share Posted May 7, 2018 Boa tarde, alguém pode me ajudar?? Acesso o site, preencho campos e dou o click (via programação, ver abaixo), só que nesta página de retorno não consigo capturar dados. o RETIRA_MASCARA(cCNPJ) apenas retira a pontuação da variável cCNPJ Preciso alguns dados deste retorno para gravar em uma base de dados: [[ msg_retorno ]] [[ documento_pesquisado ]] [[ hora_consulta]] Function PROTESTO() Local hWnd, oOle, cUrl:="http://pesquisaprotesto.com.br/consulta" TRY oOle:= CreateObject("InternetExplorer.Application") oOle:Visible := .t. oOle:ToolBar := .f. oOle:StatusBar := .f. oOle:MenuBar := .f. oOle:Navigate2(cUrl) hWnd:=oOle:hWnd ShowWindow(hWnd, 1 ) BringWindowToTop(hWnd) While oOle:Busy syswait(.5) End CATCH END TRY oOle := oOle:Document() oOle:All:Item("cpf_cnpj",0):Value := RETIRA_MASCARA(cCNPJ) oOle:All:Item("cpf_cnpj",0):Focus() syswait(.5) oOle:All:Item("cpf_cnpj",0):Click() syswait(.5) oOle:All:Item("btEnviarConsulta",0):Focus() oOle:All:Item("btEnviarConsulta",0):Click() While oOle:Busy syswait(.5) End ???? PEGAR DADOS DA PAGINA DE RETORNO DE CONSULTA CATCH END oOle := Nil return(.t.) TRECHO DA PÁGINA DE RETORNO: <div class="row centered retorno" id="msg_retorno" style="display:none"> <div class="column center aligned centered"> <div class="ui large center aligned"> <h2 class="ui header center aligned" v-bind:class="[protestos.length > 0 ? 'red' : 'green']"> [[ msg_retorno ]] </h2> <div class="ui blue button" onclick="$('#actions').modal('show')" v-if="protestos.length > 0 ">Solicitar Certidão</div> </div> </div> </div> <h4 class="ui header row medium centered fluid pesquisa" style="display:none"> <div class="content center aligned"> <div class="sub header huge center aligned"> <b>Documento Pesquisado:</b> [[ documento_pesquisado ]] </div> <div class="sub header huge center aligned"> <b>Data da Pesquisa:</b> [[ data_consulta ]] as [[ hora_consulta]] </div> </div> </h4> GRATO PELA AJUDA Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.