[wtr-general] Re: How to access a href link which is a java script?
Try: ie.link(:class, "sWhiteLink").fire_event('onclick') For reference: http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Element.html#M000557 Hope it helps. orde On Aug 12, 1:43 pm, Chan Nguyen wrote: > Hi, > I used Firebug to locate the element, it's a text link. And here is > element's HTML: > Customize Home Page > I tried : > ie.link( :class, "sWhiteLink" ).click > but Watir does not regconize it? Any idea? > > Thanks, -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: How to access a href link which is a java script?
Thanks a lot order, I got it worked when I tried : ie.link( :text, "Customize Home Page" ). On Aug 12, 1:48 pm, orde wrote: > Try: > > ie.link(:class, "sWhiteLink").fire_event('onclick') > > For > reference:http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Element.html#M000557 > > Hope it helps. > > orde > > On Aug 12, 1:43 pm, Chan Nguyen wrote: > > > Hi, > > I used Firebug to locate the element, it's a text link. And here is > > element's HTML: > > Customize Home Page > > I tried : > > ie.link( :class, "sWhiteLink" ).click > > but Watir does not regconize it? Any idea? > > > Thanks, -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: How to access a href link which is a java script?
Just offhand, I'd wager there was more than one link on the page with class="sWhiteLink" , so you'd needed to have added an index value, or another 'how' in order to uniquely identify the link. On Aug 12, 1:56 pm, Chan Nguyen wrote: > Thanks a lot order, > I got it worked when I tried : > ie.link( :text, "Customize Home Page" ). > > On Aug 12, 1:48 pm, orde wrote: > > > > > Try: > > > ie.link(:class, "sWhiteLink").fire_event('onclick') > > > For > > reference:http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Element.html#M000557 > > > Hope it helps. > > > orde > > > On Aug 12, 1:43 pm, Chan Nguyen wrote: > > > > Hi, > > > I used Firebug to locate the element, it's a text link. And here is > > > element's HTML: > > > Customize Home Page > > > I tried : > > > ie.link( :class, "sWhiteLink" ).click > > > but Watir does not regconize it? Any idea? > > > > Thanks, -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com