From: <pas...@ya...> - 2004-04-29 17:05:10
|
I come back on this problem. I worked on another thing since 2 month but now, I returns on this. I have a top level page which contains 2 frames. In the first frame, I load a page with 3 radiobox. When I click on one or another radiobox of this page, the page of the second frame is updated. My problem is to collect the updated page of my top level page. In fact, I collect the content of my second frame before update but I don't know how can I collect it after the update(after action on radiobox). With an example code : /**************************************/ //Initialize the url. java.net.URL url = new java.net.URL(args[0]) ; WebClient webClient = new WebClient() ; ScriptEngine se = webClient.getScriptEngine() ; //here, I collect the page which contains my 2 frames. HtmlPage page = (HtmlPage) webClient.getPage(url); try { //collect the first and the second frames. //The first frame is not change the second for moment. //An action on the first updates the second frame. fr1 = getFrameByIndex(page,0,"Frame1(index)"); fr2 = getFrameByIndex(page,1,"Frame2(page before update action)"); //I execute an action to change the contents of the second frame. fr3 = execJS(fr1,se,"Jscript code to update second page of frame","UPDATE") ; ????=> Now, How can we collect again the top level page with the first page and the updated second page ? How can I collect directly the updated second page ? I don't find the solution for moment. /**************************************/ I hope that it's more clear for you. Pascal. --- Mike Bowler <mb...@Ga...> a écrit : > pascal NICOLAS wrote: > > How can I collect a new HtmlPage object obj2 which > is > > updated after the action on the obj1 ? > > I don't think I understand the problem. You already > have the top level > page which contains two frames. You can ask each > one of those frames > for their content (another Page). > > What are you trying to do that you are having > trouble with? > > -- > Mike Bowler > Principal, Gargoyle Software Inc. > Voice: (416) 822-0973 | Email : > mb...@Ga... > Fax : (416) 822-0975 | Website: > http://www.GargoyleSoftware.com > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps > Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com |