Re: [Webunitproj-users] RE: iFrame
Brought to you by:
dgan
From: Doron <dg...@sh...> - 2002-11-16 22:23:55
|
Hi Erik, iFrame, your just asking for trouble aren't you? ;-) Looks like you have a frame that already exists called "idTextAccountNumberBackIframe". And the javascript code generates some text in there. Well, I believe the trick is to get the HTML from the FRAME __AFTER__ it has been generated. Because if you ask for the HTML before its done generating you won't get what you expected and web unit caches this until you change pages to make it work faster. So the trick is to ask the frame for its content, have web unit ignore the cache, until you get what you expected. I can play with this on Monday if you don't get to it. Also on Monday I am going to add a class to do button pushing and text field entry for popups. This is specific to windows but will allow us to handle certain unexpected scenarios (dialogs IE brings up which can not be suppressed). -Doron On Fri, 2002-11-15 at 14:38, Eri...@al... wrote: > The listserver didn't send this out for some reason. > Let's try this again. > > --Erik > > > -----Original Message----- > > From: Ostermueller, Erik > > Sent: Thursday, November 14, 2002 4:28 PM > > To: web...@li... > > Subject: iFrame > > > > > > Hello All (in the most 'Doron' sense of the word), > > > > I don't know the terminology for what I'm about to describe, > > so bear with me in my verbose explanation. > > > > If I right-click on a regular html page with no tricks > > and say view source, I'll get all the source for the > > entire page. > > That's the easy part. > > > > A web guy on our team who knows a lot more than me has > > put some 'iFrames' into our pages. > > > > If you right click on one of these babies and select > > 'view source', > > you get only the source for that iFrame. He tells me that > > the html is dynamically generated by java script. > > > > How can I use WebUnit to manipulate the html generated > > by this little iFrame thingy. > > The WebResponse doesn't contain this html. I need some > > way to drill down > > into this thing. > > > > Here is an example of the javascript that creates this thingy: > > > > var htmlAccountNumberFrameDocument = > > document.frames( "idTextAccountNumberBackIframe" ).document; > > > > htmlAccountNumberFrameDocument.write( > > "<html><head>"); > > htmlAccountNumberFrameDocument.write( > > "<LINK REL='STYLESHEET' HREF='cc/stylesheets/usaa.css' > > TYPE='text/css'><script type='text/javascript' > > language='JavaScript' > > src='javascript/filterkeys.js'></script>" ); > > htmlAccountNumberFrameDocument.write( > > "</head>" ); > > htmlAccountNumberFrameDocument.write( > > "<body topmargin='0' leftmargin='0' scroll='no'><INPUT > > TYPE='TEXT' NAME='textAccountNumber' VALUE='' > > MAXLENGTH='16' ID='idTextAccountNumber' > > STYLE='width:100%;font-size: > > xx-small;border-right-style:none;border-right-width:0;' > > ONCLICK='javascript:document.enablementGroup.toggle(this > > );' ONKEYPRESS='javascript:FilterKeys.numbersOnly();' > > ONKEYUP='javascript:document.enablementGroup.toggle(this > > );'></body>" ); > > htmlAccountNumberFrameDocument.write( > > "</html>" ); > > htmlAccountNumberFrameDocument.close(); > > > > > > Thanks, > > > > --Erik > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > Webunitproj-users mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webunitproj-users |