
lzamora
Members-
Posts
13 -
Joined
-
Last visited
lzamora's Achievements

Seeker (1/7)
0
Reputation
-
Getting a javascript grid on a html page
lzamora replied to lzamora's topic in AutoIt General Help and Support
Yes, it works. Returns me info from header and standard fields, but it doesnt bring any info about the grid after the search. Im using all variations of the same command. and below is the structure im working whit. #include <ie.au3> #include <Array.au3> ;~ $file = @ScriptDir & "\1.htm" ;make your script store the file localy, or point it to the open instance. ;~ $oIE = _IECreate($file,0,0) ;open the file WinActivate ("Grupo Madagascar - Financeira") Dim $oIE = _IEAttach ("Grupo Madagascar - Financeira") $oTable = _IETableGetCollection ($oIE, 0) $aTableData = _IETableWriteToArray ($oTable, True) _ArrayDisplay($aTableData) I need only the response that the grig was build to mensure the time that yhis search was taking. If i had tha return that the grig was loaded i have the answer for my problems. tks a lot! -
Hi folks. I'm trying to get a response of a grid (enable) doing a search on a intranet page. Get this picture! 1.I´m typing and selectind some fields to build a search for documents on my intranet page 2.While im doing this, a have a hide section below this fields (i cant see while im building my search) 3.After i defined all the fields im clicking on search button. 4.After clicking on search button, a grid appears bringing the results of my search ??This grid i trying to get...is part of the same page, same form... ??Also, after that i need to move some of the info to a excel document.... Hope you guys could help me out. thanks!
-
hello I'm referring to _ieattach doubt, I have a dialog where a table with commands in javascript, I'm aware that these commands can be activated by the _ienavigate, but to give a _ieattach and parameterizing as DialogBox Embedded or returns an error I would like to give this guidance to onclick on command. Box specification: >>>> Window <<<< Title window: Busca de Divisões XYZ -- Caixa de diálogo Página da Web Class: Internet Explorer_TridentDlgFrame Position: 322, 264 Size: 386, 272 Style: 0x96C80000 ExStyle: 0x00000101 Handle: 0x005E03F2 >>>> Control <<<< Class: Internet Explorer_Server Instance: 1 ClassnameNN: Internet Explorer_Server1 Advanced (Class): [CLASS:Internet Explorer_Server; INSTANCE:1] ID: Text: Position: 0, 0 Size: 380, 240 ControlClick Coords: 126, 149 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x00280322 >>>> Mouse <<<< Position: 126, 149 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<<
-
Ok, if my application take more than 5 minutes to load i cant continue my test using a pre-defined command in AutoIt? Are there any command to continue the tests only after page loads completly?...I dont wanna work with sleeps anymore, because my appl is very inconsistent. Im sorry for my limited knowleadge, but im quite new on this field. thank you
-
Guys, Im using a this sentence to wait for rensponse of my $oIE3, but my page used to take 30 sec until 3 minutes, thats why im not using Loadwait and LoadwaitTimeout. $Variable1= "Test1" $Variable2= "Test2" $oIE3 = _IENavigate($oIE,"javascript:go?("...$Variable1...$Variable2")'") While _IEProperGet($oIE3,"readystate")=4 sleep(2500) WEnd _IEAttach($oIE4) however this is not working as well, i need to wait my page load completly before continue my script. Can you guys help me out on that!? Peace!
-
Thanks, I´ve got the solution, it does work at all! Peace
-
$IE = _IEAttach($Nome_Cliente) msgbox (0,"", $IE) $Form = _IEFormGetObjByName ($IE, "importacaoForm") $oText = _IEFormElementGetObjByName ($Form, "cdOperacao") $IEcodigo= _IEFormElementGetValue ($oText) $NameText = _IEFormElementGetObjByName ($Form, "clienteRisco.nmPessoa") $IEnome= _IEFormElementGetValue ($NameText) msgbox (0,$IEcodigo, $IEnome) $dbname="db.mdb" $adoConn = ObjCreate("ADODB.Connection") $adoConn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Comercial_QA\DataBase_COMERCIAL\BD_Cambio.mdb;Persist Security Info=False") $sql_insert = "insert into TB_Cambio_ConfirmaBoleto (codigo,nome) values('" & $IEcodigo & "','" & $IEnome & "')" $adoConn.Execute($sql_insert)MVP, In $Myvariable i have a number that is generated by the application, and i want get this number and stored it this variable in my mdb database. So, i thought was the attach.The curious fact is that sometime it collects the number and sometimes is comes as (Zero) Hope it clarify a litte bit. tks
-
hi guys, Im having another problem in my test...see if you guys can help me again. I have a collumn im my database that shoud get the info i colect in a specific page...like this: $IE=_IEAttach ($MyVariable) msgBox(0,"", $IE) and it returns as 0 (Zero) How can i get the value that has in the specified field. hope you folks understand! Peace
-
Thanks man. It realy works!
-
Thanks Mass spammer. I´ll try this, i think it´s going to fitt well! Another questiont if you mind.. How can i clean my cache memory because im having troubles if i´m using too much _IEgetobjbyname and some For´s action are not being successfull. Thanks Again!
-
Hi guys, Im using a _IE commands and the page im working with is build in javascript, so my question is: I have a section im my application that is hide when i select some information above(TxtName.Visible=False) and i know that i can see and work whith it even if it is visible.false. Basicly i need to do a [iF] that my response shoul be if the field is visible or not. Which parameter or code should i use in my [iF] to get the hide field. I hope you guys understand my issue. And how can i do that? Thanks 4 all!
-
#include <IE.au3> ;============================================================================================== ; ** --- CONEXÃO COM A BASE DE DADOS ---*** ;============================================================================================== $dbname="db.mdb" $adoCon = ObjCreate ("ADODB.Connection") $adoCon.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Comercial_QA\DataBase_COMERCIAL\BD_Cambio.mdb;Persist Security Info=False") $adoRs = ObjCreate ("ADODB.Recordset") $adoRs.CursorType = 1 $adoRs.LockType = 3 $adoRs.Open ("Select * from TB_Cambio_GeraBoleto", $adoCon) ;============================================================================================== ; ** --- Declaração das VARIAVEIS Usadas ---*** ;============================================================================================== With $adoRs If $adoRs.RecordCount <> 0 Then While Not $adoRs.EOF Dim $Nome_Cliente= $adoRs.Fields ("CMB_Nome").Value $ComboTipo= $adoRs.Fields ("CMB_Tipo").Value $ComboDivisao= $adoRs.Fields ("CMB_Divisao").Value ; $BuscaDivisao= $adoRs.Fields ("CMB_BuscaDivisao").Value $ValorCampoME= $adoRs.Fields ("CMB_ValorME").Value $ValorCampoMoeda= $adoRs.Fields ("CMB_Moeda").Value $ValorCampoMoedaDespesa= $adoRs.Fields ("CMB_Despesa").Value $ValorCampoDespesaLocal= $adoRs.Fields ("CMB_MoedaDespesa").Value $ValorTaxaCliente= $adoRs.Fields ("CMB_TXCliente").Value $ValorTaxaClienteTIR= $adoRs.Fields ("CMB_TXClienteTIR").Value $ValorTaxaJuros= $adoRs.Fields ("CMB_JurosTX").Value $ValorTIRJuros= $adoRs.Fields ("CMB_JurosTIR").Value $ValorTXRemunera= $adoRs.Fields ("CMB_JurosTXRemuneracao").Value $ValorTIRRemunera= $adoRs.Fields ("CMB_JurosTIRRemuneracao").Value $ValorDTMN= $adoRs.Fields ("CMB_DTLiquidaMN").Value $ValorDTME= $adoRs.Fields ("CMB_DTLiquidaME").Value $ValorFormaLiq= $adoRs.Fields ("CMB_FormaLiquidaME").Value $ValorContatoAssociado=$adoRs.Fields ("CMB_ContatoAssociado").Value ;============================================================================================== ; ** --- ATIVAR BROWSER INTERNET EXPLORER & COMERCIAL ---*** ;============================================================================================== ;Chamar pagina Comercial $IE = _IECreate ("http://comercialqa.bvnet.bv") Sleep(1000) ;MAximiza WinSetState("Grupo Votorantim", "", @SW_MAXIMIZE) ;============================================================================================== ; #### LOGIN COMERCIAL #### ;============================================================================================== ;Pega o form $Form = _IEFormGetObjByName ($IE, "flogin") ;Usuario $usuario = _IEFormElementGetObjByName ($Form, "usuario") _IEFormElementSetValue ($usuario, "talentpro.tyamamoto") ;Senha $senha = _IEFormElementGetObjByName ($Form, "senha") _IEFormElementSetValue ($senha, "protheus00") _IEImgClick ($IE , "bt_enviar.gif", "src") ;Executa o login ;_IEFormSubmit ($Form) ;============================================================================================== ; ; #### BUSCA CLIENTE #### ;============================================================================================== ;_IENavigate($IE, "http://comercialqa.bvnet.bv/busca/index.com?bean=busca.BuscaBean&acao=inicio") $SubIE=_IENavigate($IE, "http://comercialqa.bvnet.bv/busca/index.com?bean=busca.BuscaBean&acao=inicio") ;Form da tela Clientes - Busca $Form_Busca_Cliente = _IEFormGetObjByName ($IE, "fpesquisa") ;Radio _IEFormElementRadioSelect ($Form_Busca_Cliente, 2, "tipo", 1, "byValue") ;Depois trocar o nome pela variável que leu o valor do banco Send ($Nome_Cliente) Sleep(1000) ;Botão Pesquisar _IEImgClick ($IE, "bt_pesquisar.gif", "src") $Cont=0 Do Inclui_Boleto() $Cont= $Cont + 1 Until $Cont= 5 ;========================================================================================================================= ; ---- Segunda parte do script *** NAVEGAÇÃO E PREENCHIMENTO DOS CAMPOS DE IMPORTAÇÃO *** ---- ;========================================================================================================================= Func Inclui_Boleto() WinSetState("Grupo Votorantim","",@SW_ENABLE) Sleep (5000) MouseClick ("Left",150,475) Sleep(40000) ControlGetText ($IE,"","Edit1") WinActivate($Nome_Cliente, "") WinSetState($Nome_Cliente, "", @SW_SHOW) WinSetState($Nome_Cliente, "", @SW_MAXIMIZE) $IE = _IEAttach($Nome_Cliente) ControlGetText ($IE,"","Edit1") Sleep(15000) ;========================================================================================================================= ; Clica no Menu e Sub-Menu. TOMAR CUIDADO, PODE MUDAR DE POSIÇÃO ;========================================================================================================================= MouseClick("Left", 600,110) MouseClick("Left", 600,130) Sleep(15000) ;========================================================================================================================= ; Pega o form ;========================================================================================================================= $Form = _IEFormGetObjByName ($IE, "importacaoForm") Sleep(1000) ;========================================================================================================================= ; Seleciona o ComboBox Tipo ;========================================================================================================================= $Tipo = _IEFormElementGetObjByName ($Form, "produto.cdProduto") _IEFormElementOptionselect ($Tipo, $ComboTipo, 1, "byText") Sleep(2000) ;========================================================================================================================= ; Seleciona o ComboBox Divisão ;========================================================================================================================= $DivisaoCombo = _IEFormElementGetObjByName ($Form, "tpDivisaoComercial") _IEFormElementOptionselect ($DivisaoCombo, $ComboDivisao, 1, "byText") Sleep(1000) ;========================================================================================================================= ; Seleciona Busca Divisão ;========================================================================================================================= MouseClick("Left", 595,292) ;WinActivate("Busca de Divisões Comerciais", "") sleep(4000) WinSetState("Busca de Divisões Comerciais -- Webpage Dialog","",@SW_ENABLE) MouseClick("Left",492,367) Sleep(2000) ;========================================================================================================================= ; ValorMe ;========================================================================================================================= $ValorMe = _IEFormElementGetObjByName ($Form, "frmVrOperacaoME") _IEFormElementSetValue ($ValorMe, $ValorCampoME) Sleep(2000) ;========================================================================================================================= ; Seleciona o ComboBox Moeda ;========================================================================================================================= $Moeda = _IEFormElementGetObjByName ($Form, "moedaVenda.cdMoeda") _IEFormElementOptionselect ($Moeda, $ValorCampoMoeda, 1, "byText") Sleep(2000) ;========================================================================================================================= ; Seleciona o ComboBox Moeda Despesa ;========================================================================================================================= $MoedaDespesas = _IEFormElementGetObjByName ($Form, "moedaDespesaLocal.cdMoeda") _IEFormElementOptionselect ($MoedaDespesas, $ValorCampoMoedaDespesa, 1, "byText") Sleep(2000) ;========================================================================================================================= ; Despesa Local ;========================================================================================================================= $Despesa_Local = _IEFormElementGetObjByName ($Form, "frmVrDespesaLocal") _IEFormElementSetValue ($Despesa_Local, $ValorCampoDespesaLocal) Sleep(2000) ;========================================================================================================================= ; Taxa Cliente ;========================================================================================================================= ;$TxCliente = _IEFormElementGetObjByName ($Form, "frmTxOperacao") ;_IEFormElementSetValue ($TxCliente, "700,00000000") MouseClick("Left", 131,426) Send($ValorTaxaCliente) Send("{ENTER}") ;Send("{TAB}") ;Send ("030") ;========================================================================================================================= ; Taxa TIR ;========================================================================================================================= $TxClienteTIR = _IEFormElementGetObjByName ($Form, "frmTxTirOperacao") _IEFormElementSetValue ($TxClienteTIR, $ValorTaxaClienteTIR) Sleep(1000) ;========================================================================================================================= ; Taxa Juros ;========================================================================================================================= $TxJuros = _IEFormElementGetObjByName ($Form, "frmPcTxJuros") _IEFormElementSetValue ($TxJuros, $ValorTaxaJuros) Sleep(1000) ;========================================================================================================================= ; Tir Juros ;========================================================================================================================= $TirJuros = _IEFormElementGetObjByName ($Form, "frmPcTirTxJuros") _IEFormElementSetValue ($TirJuros, $ValorTIRJuros) Sleep(2000) ;========================================================================================================================= ; Taxa Renumeração ;========================================================================================================================= $TxRemunera = _IEFormElementGetObjByName ($Form, "frmPcRemuneracao") _IEFormElementSetValue ($TxRemunera, $ValorTXRemunera) Sleep(1000) ;========================================================================================================================= ; Tir Juros ;========================================================================================================================= $TirRemunera = _IEFormElementGetObjByName ($Form, "frmPcTirRemuneracao") _IEFormElementSetValue ($TirRemunera, $ValorTIRRemunera) Sleep(1000) ;========================================================================================================================= ; Data Liquidação MN ;========================================================================================================================= $DT_Liquida_MN = _IEFormElementGetObjByName ($Form, "valorDtLiquidMN") _IEFormElementSetValue ($DT_Liquida_MN, $ValorDTMN) Sleep(2000) MouseClick("Left", 572,426) Sleep(2000) MouseClick("Left", 596,426) ;========================================================================================================================= ; Data Liquidação ME ;========================================================================================================================= $DT_Liquida_ME = _IEFormElementGetObjByName ($Form, "valorDtLiquidME") _IEFormElementSetValue ($DT_Liquida_ME, $ValorDTME) MouseClick("Left", 575,448) Sleep(2000) MouseClick("Left", 595,448) send("{ENTER}") ;========================================================================================================================= ; Forma Liquidação MN ;========================================================================================================================= $FormaLiq = _IEFormElementGetObjByName ($Form, "tpFormaLiquidacaoMN") _IEFormElementOptionselect ($FormaLiq, $ValorFormaLiq, 1, "byText") Sleep(1000) ;========================================================================================================================= ; Contato - Associado a ;========================================================================================================================= $Contato_associado = _IEFormElementGetObjByName ($Form, "contatoForm.frmTpContato") _IEFormElementOptionselect ($Contato_associado, $ValorContatoAssociado, 1, "byText") Sleep(2000) ;========================================================================================================================= ;Seleciona Nome Contato ;========================================================================================================================= WinSetState("Busca de Contatos -- Webpage Dialog","",@SW_ENABLE) MouseClick("Left", 505, 675) Sleep (4000) MouseClick("Left", 392, 312) Sleep (2000) ;========================================================================================================================= ;Seleciona telefone Contato ;========================================================================================================================= WinSetState("Busca de Telefones -- Webpage Dialog","",@SW_ENABLE) MouseClick("Left", 728, 672) Sleep (4000) MouseClick("Left", 451,360) Sleep (3000) ;========================================================================================================================= ; Clicar Confirma Operação ;========================================================================================================================= ;$ConfirmaOperacao = _IEFormElementGetObjByName ($Form, "Src=/images/bt_confirma_operacao.gif") ;_IEImgClick ($IE, "bt_gravar.gif") MouseClick("Left", 1011,684) Sleep (3000) MouseClick("Left", 846,660) ;========================================================================================================================= ; Clicar Botão OK ;========================================================================================================================= WinSetState ("Windows Internet Explorer","",@SW_SHOW) WinActive ("Windows Internet Explorer") WinSetState ("Windows Internet Explorer","",@SW_ENABLE) Sleep(10000) MouseClick("Left", 514,426) ;========================================================================================================================= ; Fechar tela Cambio ;========================================================================================================================= sleep(3000) WinActivate($Nome_Cliente, "") WinSetState($Nome_Cliente, "", @SW_SHOW) WinSetState($Nome_Cliente,"",@SW_ENABLE) sleep(20000) MouseClick("Left", 745,58) sleep(10000) $Form = _IEFormGetObjByName ($IE, "importacaoForm") $oText = _IEFormElementGetObjByName ($Form, "cdOperacao") $IEcodigo= _IEFormElementGetValue ($oText) $NameText = _IEFormElementGetObjByName ($Form, "clienteRisco.nmPessoa") $IEnome= _IEFormElementGetValue ($NameText) ; $Result = "NOK" ; ; If $IEcodigo <> 0 Then ; $Result = "OK" ; ElseIf ; $Result = "NOK" ; Endif $dbname="db.mdb" $adoConn = ObjCreate("ADODB.Connection") $adoConn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Comercial_QA\DataBase_COMERCIAL\BD_Cambio.mdb;Persist Security Info=False") $sql_insert = "insert into TB_Cambio_ConfirmaBoleto (codigo,nome) values('" & $IEcodigo & "','" & $IEnome & "')" $adoConn.Execute($sql_insert) $adoConn.Close EndFunc $adoRS.MoveNext WEnd EndIf EndWithHi Folks! I was looking to solve my problem that is the same as Anunes, but my code is a little bit more complex. I would like to know what does it mean...and if you guys know how to fix that. It looks like AutoIt Bug.. Help me up... Error: "Line 1247 (File "C:\Arquivos\AutoIt3\Beta\Include\IE.au3"): $o_col = $o_object.document.forms.item($s_Name) $o_col = $o_object.document^ERROR My code below:
-
Guy´s Im pretty new developing in Autoit, let me see if you guys can help me out with this simple situation. Im trying to select a value inside a combo-box that has more than one value and i would like to know which is the easy way to do it. tks 4 you attention.