Thanks Ravi & Cynthia. It worked :) Regards, Natasha
Cynthia Zhang <[EMAIL PROTECTED]> wrote: This shall work as well: ie.form(:id,'login_form').text_field(:name, 'u_name').set'user' ie.form(:id,'login_form').text_field(:name, 'p_word').set'password' ie.form(:id,'login_form').button(:class,'btSubmit').click -----Original Message----- From: watir-general@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tiffany Fodor Sent: Wednesday, 8 October 2008 8:20 a.m. To: Watir General Subject: [wtr-general] Re: How to locate an INPUT element embedeed in a table Yay! Nice work Ravi! On Oct 7, 2:13 pm, Ravi wrote: > I found the following working! > > $ie.div(:id,'maincontent').text_field(:name,'u_name').set '1234' > > $ie.div(:id,'maincontent').text_field(:name,'p_word').set '1234' > > On Oct 7, 12:26 pm, Tiffany Fodor wrote: > > > Hi again! > > > I didn't realize your site was public, so I gave it a shot myself. > > The username and password on thehttp://www.fotolog.comhomepagework > > fine, but I'm having the same problem with the password field on > > thehttp://account.fotolog.com/loginpage. > > > If you find a way around this, I'd be really excited to learn how > > you did it - this problem drove me nuts! > > > -Tiffany > > > On Oct 7, 11:12 am, Natasha Ranney wrote: > > > > Thanks Tiffany. I will try that out. Just that this is not our code. This > > > belongs to Fotolog. But anyways, will surely try out the options > > > suggested and revert with my observations. > > > > Regards, > > > Natasha > > > > Tiffany Fodor wrote: > > > > Sorry, I should have included this in my original response.... > > > > I don't think your problem is related to your object being > > > embedded in a table, I think there's a protection on it that > > > doesn't allow automated tools to access it. You can verify this > > > by just performing a .exists? on your object to make sure that > > > Watir can see that it's there. > > > > Also, if you're not using it already, command-line IRB is a great > > > way to troubleshoot working with objects. > > > > -Tiffany > > > > On Oct 7, 11:02 am, Tiffany Fodor wrote: > > > > > Hi Natasha! > > > > > I've run into the same problem with password confirmation fields > > > > when adding a user in an application. If the field will not > > > > accept focus from Watir, you may need to see if you can get your > > > > developer to change the properties on it. I tried everything I > > > > could think of and even solicited help from several experts on > > > > the list with whom I could share my private URL. In my case, > > > > there was no way around the protection on the field. > > > > > Off the top of my head, the things I tried were: > > > > > - using each property available to identify the field > > > > - using the field index to identify it > > > > - using send keys to tab to the field from a known location and > > > > type in it > > > > > If none of these work for you, I suggest you work with your > > > > developer to get it changed. > > > > > Sorry I couldn't be more help..... > > > > > -Tiffany > > > > > On Oct 7, 10:27 am, Natasha wrote: > > > > > > Hello All, > > > > > > I am trying to automate Fotolog's login page. Please could you > > > > > help me. > > > > > > Following is the snippet of HTML code: > > > > > -------------------------------------------------------------- > > > > > ----------------- > > > > > > Username: > > > > > [input] > > > > > > Password: > > > > > [input] > > > > > > class="btSubmit0">Login > > > > > > Forgot your password? > > > > > > -------------------------------------------------------------- > > > > > ------------------------------- > > > > > > I need to automate the typing in user name and password, > > > > > followed by clicking on login button. > > > > > > I have tried following sets of codes, but it didn't work. > > > > > > 1. Accessing text type fields using aftertext attribute > > > > > > $ie.text_field(:aftertext,/Username:/).set("user1") > > > > > $ie.text_field(:aftertext,/Password:/).set("pwd1") > > > > > $ie.button(:text,"Login").click > > > > > > 2. Accessing text fields using name attribute > > > > > > $ie.text_field(:name,"u_name").set("user1") > > > > > $ie.text_field(:name,"p_word").set("pwd1") > > > > > $ie.button(:text,"Login").click > > > > > > Am getting following error: > > > > > ============================================================ > > > > > WIN32OLERuntimeError: focus > > > > > OLE error code:800A083E in htmlfile > > > > > Can't move focus to the control because it is invisible, > > > > > not enabled, or o f a type that does not accept the focus. > > > > > HRESULT error code:0x80020009 > > > > > Exception occurred. > > > > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ > > > > > input_elements.rb:334:in > > > > > `method_missing' > > > > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ > > > > > input_elements.rb:334:in > > > > > `set' > > > > > C:/natasha/RubyScripts/FinalAutomatedTests/minicard_fotolog.rb: > > > > > 54:in `test_a > > > > > _orderPlacement' > > > > > ============================================================ > > > > > > Thanks and regards, > > > > > Natasha ##################################################################################### This correspondence is for the named person's use only. It may contain confidential or legally privileged information, or both. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Veda Advantage. If you need assistance, please contact Veda Advantage on either :- Australia 133124 or New Zealand +64 9 367 6200 --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---