This ought to do it: require 'watir' include Watir ie=IE.new ie.goto("file://c:/temp2.htm") ie.element_by_xpath("//*...@name='imp1']").click()
Richard -- Richard Lawrence Certified Scrum Coach Founder and Principal Consultant, Humanizing Work, LLC 303-895-7688 rich...@humanizingwork.com www.humanizingwork.com www.richardlawrence.info On Tue, Jan 13, 2009 at 3:30 AM, TCBlues <tcbl...@gmail.com> wrote: > > I need to access an object through the name without knowing wich kind > of object is. > > For example the control could be a button or a link and I would like > to do something like: > > require 'watir' > include Watir > ie=IE.new > ie.goto("file://c:/temp2.htm") > > ie.object(:name,"imp1").click() > > Is there any way???? > > Thank you in advance. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---