How to find the ID of input fields (Texts and Listbox)?

1

I ran the code below and was able to identify the field ("body_x_tabc_x_identity_x_prxidentity_x_selBscenCode_x_txtselBscenCode_x_x") via the Set objInputs line. But I can not identify the other fields. Among them there are also listboxes. Detail: The "display source" function is disabled. How can I identify fields to enter information from VBA? Thanks!

Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" _
        (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Global Const SW_MAXIMIZE = 3
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2


Sub Botão1_Clique()
'
' Botão1_Clique Macro
'
' Cria um novo objecto do IE
Set IE = CreateObject("InternetExplorer.Application")

' Indica ao IE que deve navegar para a página
IE.Navigate "https://minhapagina.com"
IE.Visible = True
apiShowWindow IE.hwnd, SW_MAXIMIZE

' Loop de espera até o IE carregar a página
Do
DoEvents
Loop Until IE.ReadyState = 4

Set objInputs = IE.Document.getElementsByTagName("input")

' Preenche os campos necessários

IE.Document.getElementByID ("body_x_tabc_x_identity_x_prxidentity_x_selBscenCode_x_txtselBscenCode_x_x").Value = "YF - Indirect Material – Goods and services (free text)"

Set IE = Nothing

End Sub
    
asked by anonymous 28.04.2016 / 21:34

0 answers