whanenbu Posted March 15, 2012 Posted March 15, 2012 (edited) I am under iFrames and here is my code:.Dim $oIE1, $oFrames, $oFrame1, $oForm, $oQuery$oIE1 = _IEAttach("http://tempo5.sandicor.com/Default.asp","URL")$oFrames = _IEFrameGetCollection ($oIE1,1)$oFrame1 = _IEFrameGetCollection ($oFrames,0)$oForm = _IEFormGetObjByName ($oFrame1, "SEARCHCRITERIA") ' ;attach to form$oQuery = _IEFormElementGetObjByName ($oForm, "F226") ; set value problem area required field_IEFormElementSetValue($oQuery, "92071")$oQuery = _IEFormElementGetObjByName ($oForm, "L192") ; set value works no req field_IEFormElementSetValue($oQuery, Round(1400 * .8))$oQuery = _IEFormElementGetObjByName ($oForm, "H192") ; set value works no req field_IEFormElementSetValue($oQuery, Round(1400 * .2 + 1400)This code selects the form and then updates the values. This part works. What is not working is setting the value 92071. It appears this is a required field and even though the 92071 is shown on the form, the field is not recognized. It have tried the _IEAction($oQuery, click, focus, enable) , and fire parameter in IEFormElementSetValue, but the field is just not recognized.What do I try next? I do not see anything for validation.Thanks in advance. Edited March 16, 2012 by whanenbu
whanenbu Posted March 26, 2012 Author Posted March 26, 2012 (edited) Here is a solution. I needed to attach to the window and use the send key. I don't like using the send but using iframes I can not seem to do it any other way. The problem was that once the value was set, it needed to validate and would not. I hope someone can improve on it. $oQuery = _IEFormElementGetObjByName ($oForm, "F226") _IEAction($oQuery, "focus" ) _IEFormElementSetValue($oQuery,"92071") WinActivate("Tempo - Windows Internet Explorer") WinWaitActive("Tempo - Windows Internet Explorer") Send( "{RIGHT}" ) Send( "{TAB}" ) Note: this may be party an IE9 issue Edited March 26, 2012 by whanenbu
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