[Wtr-general] clicking on Active Element buttons

Mike Tierney Tierney at rdacorp.com
Tue May 9 14:13:51 EDT 2006


Does anyone have experience with clicking on .Net Active Elements such as this (as seen from SpySmith) ?

Active Element: [A], Index: [268]   <A id=continue_btn title="Continue with Rate Plan" href="javascript:__doPostBack('continue_btn','')" name=ContinueButtonSpecialOffer>Select this Plan <IMG class=add_to_cart_button_special_offer src="images/spacer.gif" align=middle></A> 
I have tried all the regular Watir tricks used for clicking on javascripted buttons or images, such as the following :
$ie.button( :title,"Continue with Rate Plan" ).click 

$ie.button( :name,"ContinueButtonSpecialOffer>Select this Plan  <IMGclass=add_to_cart_button_special_offer" ).click

$ie.button( :name,"ContinueButtonSpecialOffer>Select this Plan" ).click

$ie.link(:title, "Continue with Rate Plan").fire_event('continue_btn') 
 
$ie.image(:src, "images/spacer.gif").click
$ie.image(:id, "continue_btn").click
 
 
$ie.link(:id, "continue_btn").cick
 
$ie.element(:id, "continue_btn").click
 
$ie.button( :id,"continue_btn" ).click
 
 # note the form is called frmSpecialOffer, but none of these attempts work either
$ie.form(:id, "frmSpecialOffer").submit
$ie.form(:name, "frmSpecialOffer").submit
# no help on any of these :>(

In this case my client might be just as happy with a shrink wrapped test tool that has good reliability manipulating these .Net web controls, but I told them I would ask the Watir gurus this question as part of my tool evaluations, thanks
- Mike Tierney

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060509/b0a756a6/attachment.html 


More information about the Wtr-general mailing list