Hope this helps you.

Best Regards
Ashwin Jujare

                        <groovy>
                               def ant = new AntBuilder()
                               ant.taskdef (resource:'webtest.taskdef')
                                                                        {
                                        classpath()
                                        {
                                                                                
        pathelement  (location:"../lib")
                                                                                
        fileset (dir:"../lib", includes:"**/*.jar")
                                        }
                                                                        }
                                                                def 
intLinkCount =
step.context.currentResponse.getElementsByTagName("a").size()
                                                                def 
intLinkNumber = intLinkCount
                                def elementHref
                                def element
                                def blnDecision
                                                                
while(intLinkNumber-- > 0) {
                                                                    element
= step.context.currentResponse.getElementsByTagName("a")[intLinkNumber]
                                                                   
elementHref = element.getHrefAttribute()
                                                                   
blnDecision = (elementHref == "http://www.Google.com";)
                                                                    if (
blnDecision ){
                                                                                
       
element.dblClick()
                                                                                
       
ant.verifyTitle(text:'Google')
                                                                                
        
}                       
                                                                                
                                        }
                        </groovy>



amit joshi-7 wrote:
> 
> Hi,
> 
> I need to 'double click' the web link using webtest.
> 
> I tried it using following groovy code but it is not working.
> 
> def link1 = step.context.currentResponse.getElementByName(Groovy -
> Home).fireEvent("dblClick")
> 
> 
> Can anybody suggest a solution to perform double click on web link?
> 
> Thanks...
> 
> Regards,
> Amit Joshi
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Double-Click-Link-using-WebTest-tp29373592p29415061.html
Sent from the WebTest mailing list archive at Nabble.com.

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to