Jump to content

Recommended Posts

Posted

Hi,

I'm new with autoit. I'm trying to execute a snippet of a javascript code to insert a select tag with an option.
 
I'm creating a macro to automate data input iteration on a webpage, but at some point, I need to select a dropdownlist that after the onChange event, enable a new dropdown with one option only, and also make two fields stay hidden.

Could you help me?

Posted
Local $oCombo1 = _IEGetObjById($oIEB, "EstruturaComercial_CodSegmento")
_IEFormElementOptionSelect($oCombo1, "1", 1)
Sleep(1000)

Local $oCombo2 = _IEGetObjById($oIEB, "EstruturaComercial_CodCanalVenda")
_IEFormElementOptionSelect($oCombo2, "3", 1)

Local $oTextA = _IEGetObjById($oIEB, "EstruturaComercial_CodConcessionario")
_IEFormElementSetValue($oTextA, "9035334")

Local $oTextC = _IEGetObjById($oIEB, "EstruturaComercial_NomeConcessionario_Ex")
_IEFormElementSetValue($oTextC, "CONSIGA SEG CORR DE SEGS LTDA")

Local $oCombo3 = _IEGetObjById($oIEB, "EstruturaComercial_CodBsCorretor")
_IEFormElementOptionSelect($oCombo3, "446819", 1)

Local $oTextB = _IEGetObjById($oIEB, "EstruturaComercial_CodAngariador")
_IEFormElementSetValue($oTextB, "9035334")

Local $oTextD = _IEGetObjById($oIEB, "EstruturaComercial_NomeAngariador_Ex")
_IEFormElementSetValue($oTextD, "CONSIGA SEG CORR DE SEGS LTDA")

Local $oCombo3 = _IEGetObjById($oIEB, "EstruturaComercial_CodBsAngariador")
_IEFormElementSetValue($oCombo3, "448546")

Local $oTextE = _IEGetObjById($oIEB, "EstruturaComercial_CD_GERENTE_PRODUTO")
_IEFormElementSetValue($oTextE, "9806")

Local $oSubmit = _IEGetObjById($oIEB, "BTN_EstruturaComercial_Avancar")
_IEAction($oSubmit, "click")

 

The web page that I'm trying to automate, depends on login and password, because it is a bank ... follow a print so you understand better. Thank you

Sem título.jpg

Posted

I have the js file that contains the function I need to use. What happens is that when I click on the first combo (id = CommercialStructureCodeSection), in the onChange event the select tag with the caption "Canal de venda(*)" is automatically populated with a default value.

Posted

Yes, but as there is an onChange event in the click on the first dropdown, it did not work ... This is being my difficulty ...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...