Jump to content
Sign in to follow this  
spoo

value set on a combo-box gets refreshed after hitting on save button

Recommended Posts

spoo

Hello Guys,

 

I have a combo-box and i need to set the value "Boeing commercial 767 ", it gets set for that value .However when i hit on save button its comes back to default value that is Boeing commercial 777.

Here is my code.

;Set the Program

Local $oIENew = _IEAttach("https://www.net-inspect.com/FAIRForm1.aspx","url")

$oControl=_IEGetObjById($oIENew,"cboProgram")
_IEFormElementOptionSelect($oControl,$cboProgram,1,"byText")  ; Here $cboProgram is "Boeing commercial 767 ", i'm taking it dynamically from an excel sheet
 ConsoleWrite($cboProgram &@CRLF )   ;gives Boeing commericial 767 
_IELoadWait($oIENew)

 

; Hit on Save button

 $oControl=_IEGetObjByName($oIENew,"Submit")
_IEAction($oControl,"click")

_IELoadWait($oIENew)

 

is there anything that i'm missing?

5ae934561f336_Form1png.thumb.png.b8b32de91f0b74ef755c637146826670.png 

blob.png

blob.png

SaveButton png.png

Combox.png

Share this post


Link to post
Share on other sites
Danp2
9 hours ago, spoo said:

is there anything that i'm missing?

There are probably events tied to the combobox that aren't being properly triggered. Unfortunately, the site requires a login so I'm unable take a deeper look into this for you.

Share this post


Link to post
Share on other sites
jdelaney

Try throwing in an _ie_action blur on the list after selecting the value.   that's a popular event, but a guess on my part.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
spoo

Hello  ,

Thank you all for your reply .

_IEFormElementOptionSelect($oControl,$cboProgram,1,"byText",0)

i had to add 5th parameter  that is 0 , which means do not fire onclick. 

Happy Learning!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×