0
Good afternoon, I am not able to manipulate (inmputar value) objects (textbox) of an IE page, because these objects do not have ID. Follow the code I’m using
Dim IE As InternetExplorer
Dim Ulogin As Boolean, ieForm
Dim NumProc As String: NumProc = Me.ComarcaProcesso
Dim Email As String: Email = "[email protected]"
Dim Senha As String: Senha = "123456"
Set IE = New InternetExplorer
Set IE = CreateObject("InternetExplorer.Application")
'Abre o IE maximizado.
IE.Visible = True
IE.navigate "http://www.tjrs.jus.br/site/processos/tjrs_push/"
apiShowWindow IE.hwnd, SW_MAXIMIZE
'Espera até que a página esteja totalmente carregada.
Do Until IE.ReadyState = READYSTATE_COMPLETE
Loop
'Nessa parte você deve conhecer a propriedade "name" dos elementos input do site que irá logar.
IE.Document.all("email").innerText = Email
IE.Document.all("senha").innerText = Senha
'Nessa parte você deve informar o nome (propriedade name) do formulário a ser submetido.
IE.Document.all("login").Click
Do
'Coloca o nome do campo usuário do form na página.
IE.Document.all("input_num_themis").innerText = NumProc
DoCmd.GoToRecord , , acNext
Loop
End Sub
This code does not work because it is inside an iframe. Try to automate by this site: http://www.tjrs.jus.br/proc/sistema_push/
– danieltakeshi
It worked! How do I identify this path on other sites?
– gabrielpn06
Each site has its peculiarities... In the case of this tjrs, they possessed this path within the code of iframe. But usually they do not, so you would have to discover the hierarchy of the site and use another "type" of code. How in this example, where links are within frames...
– danieltakeshi
got it. thanks a lot for your help!
– gabrielpn06