Re: [Wtr-general] Setting focus in a frame in IE7
Hi Paul, I'll look into using the maxLength option. As a matter of interest, I have used ie.send_keys("{tab}") to tab away from the address bar, and I can then set the focus in my frame! Very strange! ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Setting focus in a frame in IE7
Hi Charley, The problem with using set on a text_field is that you it will set more than the maximum field length, so foobar will be entered as foobar and not foo. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Setting focus in a frame in IE7
I just ran the same code with IE7 and it appeared to work fine. Just out of curiosity why use send_keys instead of setting the text field? ie.text_field(:index, 1).set('foo') -Charley On 5/4/07, Paul Rogers <[EMAIL PROTECTED]> wrote: Assuming your html uses regular type html and you only want to test that the text field only allows 3 chars, why not use ie.text_field(:index,1).maxLength I guess if the maximum length is imposed by a javascript method on the onKeyPress event, then this wouldnt work. As to why your code no longer works, I have no clue ;-) - Original Message - From: "Trevor Mason" <[EMAIL PROTECTED]> To: Sent: Friday, May 04, 2007 9:48 AM Subject: [Wtr-general] Setting focus in a frame in IE7 >I have a test that used to work on IE6(WIN2k), but does not with IE7(WINXP) > I am using send_keys to send 4 chars to a text field that has a maximum > length of 3, then checking there are only 3 chars > > In IE7, the focus does not move from the IE address bar, and I get > placed here. > If I use IRB and manually click somewhere within the frame before running > these commands, it works! > > $ie.frame("mainFrame").frame("centralFrame").text_field(:name, > 'privateDataDescriptor').focus > $ie.send_keys("") > > Does anyone have any ideas? > > Trevor > ___ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Setting focus in a frame in IE7
Assuming your html uses regular type html and you only want to test that the text field only allows 3 chars, why not use ie.text_field(:index,1).maxLength I guess if the maximum length is imposed by a javascript method on the onKeyPress event, then this wouldnt work. As to why your code no longer works, I have no clue ;-) - Original Message - From: "Trevor Mason" <[EMAIL PROTECTED]> To: Sent: Friday, May 04, 2007 9:48 AM Subject: [Wtr-general] Setting focus in a frame in IE7 >I have a test that used to work on IE6(WIN2k), but does not with IE7(WINXP) > I am using send_keys to send 4 chars to a text field that has a maximum > length of 3, then checking there are only 3 chars > > In IE7, the focus does not move from the IE address bar, and I get > placed here. > If I use IRB and manually click somewhere within the frame before running > these commands, it works! > > $ie.frame("mainFrame").frame("centralFrame").text_field(:name, > 'privateDataDescriptor').focus > $ie.send_keys("") > > Does anyone have any ideas? > > Trevor > ___ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Setting focus in a frame in IE7
I have a test that used to work on IE6(WIN2k), but does not with IE7(WINXP) I am using send_keys to send 4 chars to a text field that has a maximum length of 3, then checking there are only 3 chars In IE7, the focus does not move from the IE address bar, and I get placed here. If I use IRB and manually click somewhere within the frame before running these commands, it works! $ie.frame("mainFrame").frame("centralFrame").text_field(:name, 'privateDataDescriptor').focus $ie.send_keys("") Does anyone have any ideas? Trevor ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general