spoo Posted May 2, 2018 Share Posted May 2, 2018 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? Link to comment Share on other sites More sharing options...
Danp2 Posted May 2, 2018 Share Posted May 2, 2018 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. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
jdelaney Posted May 2, 2018 Share Posted May 2, 2018 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. Link to comment Share on other sites More sharing options...
spoo Posted May 3, 2018 Author Share Posted May 3, 2018 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! Link to comment Share on other sites More sharing options...
Danp2 Posted May 3, 2018 Share Posted May 3, 2018 Glad you found a simple solution, which I probably wouldn't have even tried. ;-) Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now