Marc,

I finally got this to work by attaching the event to
"href", and also putting "javascript: " infront of the
javascript function,

doc_ele.getHtmlElementsByAttribute('a', 'id',
"form1:_id11").each {
it.setAttributeValue("href","javascript:
wizard_popup('/LdomMgmt/faces/com_sun_web_ui/jsp/version/version_30.jsp','Bind',500,750,'yes');
return false;")
}

I don;t understand why but it is working now!!!

thanks a lot Marc for your great help, otherwise I
cannot make it.

Chang

--- Chang Su <[EMAIL PROTECTED]> wrote:

> Hi, Marc,
> 
> I got the page printed as xml in groovy ( saved here
> for related part),
> 
> <td>
>   <div class="textBg" onkeydown="  "
> onmouseover="this.className=&apos;textBgOver&apos;"
> onkeyup=" "
> onmouseout="this.className=&apos;textBg&apos;"
>
onclick="wizard_popup(&apos;/LdomMgmt/faces/jsp/lifeCycle/Create.jsp&apos;,&apos;CreateDomain&apos;,650,750,&apos;yes&apos;);
> return false;">
>       <table width="100%" border="0" cellspacing="0"
> cellpadding="0">
>             <tbody>
>                    <tr>
>                        (..a couple of <tr> <td>
> here..)
>                            <a id="form1:_id11"
> class="onHyplink" tabindex="1" href="#">Create
> Domain
>                            </a>
>                        (..a couple of <tr> <td>
> here..)
> 
>                    </tr>
> 
>              </tbody>
>          </table>
> 
>      </div>
> </td>
> 
> 
> does this look like onclick is attached to the
> id="form1:_id11" (link Create Domain)?
> 
> with the other puzzle I have (the other email with
> disable/enable button) I doubt whether webtest can
> execute embedded javascript ( wizard_popup() in this
> case)??
> 
> 
> thanks,
> 
> Chang
> 
> 
> --- Marc Guillemot <[EMAIL PROTECTED]> wrote:
> 
> > Hi Chang,
> > 
> > normally a clickElement (on the div, not on some
> > nested node as click
> > events don't currently bubble) should work but I
> > have a doubt. Can you
> > try following:
> > 
> > <groovy>
> > println step.context.currentResponse.asXml()
> > </groovy>
> > 
> > just after you've get this page. I fear that the
> > cause of the problem is
> > that the page doesn't get parsed correctly.
> > 
> > Marc.
> > 
> > Chang Su wrote:
> > > I thought I like to provide a bit more info
> while
> > I
> > > trie to debug this. I found in .html file that
> was
> > > saved as response from main window, it has
> > something
> > > like this,
> > > 
> > > 
> > > <td>
> > >   <div class="textBg" onkeydown="  "
> > > onmouseover="this.className='textBgOver'"
> > onkeyup="  "
> > >                                        
> > > onmouseout="this.className='textBg'"            
>  
> >    
> > >                        
> > >
> >
>
onClick="wizard_popup('/LdomMgmt/faces/jsp/lifeCycle/Create.jsp','CreateDomain',650,750,'yes');
> > > return false;">
> > >                                                 
>  
> >    
> > >           <table width="100%"  border="0"
> > > cellspacing="0" cellpadding="0">
> > >  <tr>
> > >  <td width="100%" style="border-top: 1px solid
> > > #AABCC8; border-bottom: 1px solid #AABCC8;"
> > > rowspan="3">
> > > <a id="form1:_id11" class="onHyplink"
> tabindex="1"
> > > href="#">Create Domain</a>
> > >                                                 
>  
> >    
> > >                 </td>
> > > ....
> > > 
> > > 
> > > 
> > > so how do I invoke the part
> > >
> >
>
onClick="wizard_popup('/LdomMgmt/faces/jsp/lifeCycle/Create.jsp...
> > > 
> > > which belongs to <div class="textBg" onkeydown="
> 
> > "
> > > onmouseover="this.className='textBgOver'"
> > onkeyup="  "
> > >                                        
> > > onmouseout="this.className='textBg'" ???
> > > 
> > > 
> > > thanks a lot,
> > > 
> > > 
> > > Chang
> > > 
> > > 
> > > --- Marc Guillemot <[EMAIL PROTECTED]> wrote:
> > > 
> > >> Hi Chang,
> > >>
> > >> you need to configure log4j for that. If you
> use
> > the
> > >> classpath provided
> > >> with WebTest, you just have to edit
> > >> #WebtestHome#/lib/log4j.properties
> > >>
> > >> Marc.
> > > 
> > > 
> > > 
> > >  
> > >
> >
>
____________________________________________________________________________________
> > > Do you Yahoo!?
> > > Everyone is raving about the all-new Yahoo! Mail
> > beta.
> > > http://new.mail.yahoo.com
> > 
> > _______________________________________________
> > WebTest mailing list
> > [email protected]
> > http://lists.canoo.com/mailman/listinfo/webtest
> > 
> 
> 
> 
>  
>
____________________________________________________________________________________
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and
> previews at Yahoo! Games.
> http://videogames.yahoo.com/platform?platform=120121
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 



 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to