<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>you can also use the show_all_objects method, like
this</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>in irb</FONT></DIV>
<DIV><FONT face=Arial size=2>require 'watir'</FONT></DIV>
<DIV><FONT face=Arial size=2>ie=Watir::IE.attach(:title , 'the title of your
browser window')</FONT></DIV>
<DIV><FONT face=Arial size=2>ie.show_all_objects</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and then you can use flash and to_s</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>ie.text_field(:index,1).flash</FONT></DIV>
<DIV><FONT face=Arial size=2>ie.text_field(:index,1).to_s</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=charley.baker@gmail.com href="mailto:charley.baker@gmail.com">Charley
Baker</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=wtr-general@rubyforge.org
href="mailto:wtr-general@rubyforge.org">wtr-general@rubyforge.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, May 03, 2007 2:12
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Wtr-general] Finding the
name of objects</DIV>
<DIV><BR></DIV>I'm starting to sound like a broken record and was just
thinking about updating the user guide for this. Use the ie developer toolbar
to find controls and identify them, while being familiar with the html source
and some basic knowledge around the dom is important, this will also help:
<BR><BR><A
href="http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en ">http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en
</A><BR><BR>-Charley <BR><BR>
<DIV><SPAN class=gmail_quote>On 5/3/07, <B class=gmail_sendername>Ken</B>
<<A
href="mailto:forum-watir-users@openqa.org">forum-watir-users@openqa.org</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">I
just got started with this and am trying to write a simple script to get my
feet wet. I was following the googlesearch.rb case that is
provided. My question is how do you find the name of the object
that you want to perform an action with? For example:
<BR><BR>ie.text_field(:name, "q").set("pickaxe") # q is the name of the
search field<BR><BR>How do you know that q is the name of the search
field? I viewed the source of the page and eventually found the
field named q but it was not obvious or easy. It was so murky
that if I didnt know already that the fields name was q I never would have
found it. Is there a simple way to identify a list box, text
field, radio button...etc?
<BR><BR>Thanks.<BR>_______________________________________________<BR>Wtr-general
mailing list<BR><A
href="mailto:Wtr-general@rubyforge.org">Wtr-general@rubyforge.org</A><BR><A
href="http://rubyforge.org/mailman/listinfo/wtr-general">http://rubyforge.org/mailman/listinfo/wtr-general</A><BR></BLOCKQUOTE></DIV><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Wtr-general mailing
list<BR>Wtr-general@rubyforge.org<BR>http://rubyforge.org/mailman/listinfo/wtr-general</BLOCKQUOTE></BODY></HTML>