I run the code you provide, following the html piece you have, it works. ie.text_field(:id, 'fahrenheit').flash
Thanks. Wesley Chen. 2009/4/15 Chai Taolun <[email protected]> > Hi~ > > Thank you for all the help. > I try to use ie.text_field(:id, 'fahrenheit').flash. It still give me the > error > Unable to locate element, using :id, "fahrenheit" > I do not know how to do with it. > > I think this is only one frame in the page. The php code it pretty simple. > I attached the picture of the php page with the IE developer toolbar, the > php code and the ruby code. > I really want to get the code running good. > > Best wishes. > > Allen > > > On Tue, Apr 14, 2009 at 1:11 PM, George <[email protected]> wrote: > >> >> I think Chuck is on to something...the text field is probably located >> in another frame. Try using ie.show_frames, then identify which frame >> holds the field. Then use something like: >> >> ie.frame(:index, 2).text_field(:id, 'fahrenheit').flash >> >> >> >> On Apr 14, 10:00 am, Chuck van der Linden <[email protected]> wrote: >> > is the form inside a frame? >> > >> > what errors are you getting when you tried the commands you listed? >> > the format of the command looks right, and based on what you've shown >> > us of the html I'd think they would work, so I'm wondering if there's >> > a different error now >> > >> > The element you identified using the developer toolbar is a graphic >> > (bmp) file, are you sure you clicked on the right thing? >> > >> > what is arg1 ? can you show us the code that defines it or populates >> > it >> > >> > Is the page you are hitting accessable to the public, e.g. is there a >> > way that folks could have a look at it for themselves? >> > >> > Have you tried using an irb session and seeing of you can do something >> > like >> > >> > browser.text_field(:id, 'fahrenheit').flash #should cause text >> > field to briefly strobe yellow in the browser >> > >> > On Apr 14, 5:44 am, Chai Taolun <[email protected]> wrote: >> > >> > > Hi~ >> > >> > > Thank you all for the advice. >> > > However, My problem still not settle. >> > > this is the information that IE developer toolbar shows. >> > > >> file:///C:/Users/Ctcoo/Desktop/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90 >> %8D.bmp >> > > I trid >> > > ie.text_field(:name, "fahrenheit").set(arg1.to_s) >> > > ie.text_field(:id, "fahrenheit").set(arg1.to_s) >> > > ie.text_field(:name, 'fahrenheit').set(arg1.to_s) >> > > ie.text_field(:id, 'fahrenheit').set(arg1.to_s) >> > > but none of them can get it right. >> > >> > > I was so confused. >> > >> > > Allen >> > >> > > On Mon, Apr 13, 2009 at 2:26 PM, Chuck van der Linden < >> [email protected]>wrote: >> > >> > > > To make what Amit is saying clearer >> > >> > > > You are calling ie.textField(:identifiertype, 'value') >> > >> > > > the proper name for the element is text_field not textField >> > >> > > > so you should be using the form that Amit gave below. >> > >> > > > ie.text_field(:identifiertype, 'identifiervalue') >> > >> > > > On Apr 12, 11:03 pm, amit onkar <[email protected]> wrote: >> > > > > Open IE developer toolbar . Download from this following link >> > >> > > > > >> http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672... >> > >> > > > > And make sure the field which your are testing has the right id or >> name >> > > > > which your are inserting in syntax. >> > >> > > > > And use syntax : >> > >> > > > > ie.text_field(:name, " ").set(" ") >> > >> > > > > Bye. >> >> > > > -- > There are some things in this world will never change and some things do > change. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
