Jump to content

Recommended Posts

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 by whanenbu
Link to post
Share on other sites
  • 2 weeks later...

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 by whanenbu
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...