Jump to content
Sign in to follow this  

IE Controls and unable to isolate elements

Recommended Posts

Just a quick history here. Used autoit for a long time and this sort of issue isnt too foreign to me but I am really stumped at this part.

I would like if you could help direct me here as I feel im both uncertain where to start and how to get where I need to go.


So short summary: I have a backend server of oracle doing webpages of java and javascript loading apps for clients to use for inputting data into the system. I also have a website that allows them to put in data as well that translates it into numbers for the backend.

I have been successful in automating the retrieval of data from the front end pages and modifying/putting it back no problem.

The problem is the backend has many iFrames, elements and such that it has made me stumped. Ill explain what I know and whats not working. The backend requires a login, shows a side menu and when you click on an element it loads an app that shows the page (I believe in an iframe) that you can then begin entering data. When I try viewing source of that page I can see the elements like any normal page. When I try to access them in autoit I continually get a No Match is found (I know the IDs to be correct as I can manipulate them when loading just the source code of the app generated page.

So my question is, if im unable to find these elements in the browser (but know them to be correct with just the source code) am I not finding them in the right iFrame or what? How should I begin finding out where I need to be accessing or going from here?


Here is the specific element:

<INPUT class=textfield TYPE=text NAME=0_46 MAXLENGTH=20 value=" " style=" width:81px; " onHelp=hp('0_46') onMouseOver=updateHelpCursor('',this) TABINDEX=12 ID=C0_46 htmlPostFlag=false onFocus=FCHandler.onFocusVA(this,'') onkeydown="FCHandler.onKeyDownTextField(this,'','3', event)" onBlur=FCHandler.onExitVA(this,false,'')>

I can access it correctly (when just this source code is loaded) via:

Local $oIE = _IEAttach( "", "instance", 1 ) ;Get attachment

Local $oQuery = _IEGetObjByName($oIE, "0_46") ;Element reference
_IEFormElementSetValue( $oQuery,  "20" )  ;Get Value


However when I view this same page authentically, and attach and try the same method, it registers as 'No Match'. Shouldnt calling an element from the whole browser work? Do I need to find all the frames, and such and look for it in them? What if it doesnt find an iframe with it?


Share this post

Link to post
Share on other sites

thanks very helpful.

I was finally able to access those controls but it did require specific frame and form referenceing. That embedded table discussion applied to the same method I had to use for my fields.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...