[wtr-general] Re: Difficulty typing into textfield

2010-10-13 Thread Jarmo Pertman
Or try
$b.text_field(:name, password).value = text

instead of #set, without invoking any JavaScript events. Also, you
could ask from the developers what the hell did they think with that
onfocus event when they did that :)

Jarmo Pertman
-
IT does really matter - http://www.itreallymatters.net


On Oct 11, 9:31 pm, Ethan notet...@gmail.com wrote:
 your onfocus event seems to do some interesting stuff.

 onfocus=jQuery('#mockPassword').hide();jQuery('#password').show();jQuery(' 
 #password').focus();

 basically, you're not going to be able to type into the mockPassword field
 because when you focus it, it hides itself and gives you another field. try
 something like:

 $b.text_field(:name, mockPassword).focus
 $b.text_field(:name, password).set(pass_word)



 On Mon, Oct 11, 2010 at 14:02, blkjk blkjk@gmail.com wrote:
  Thx.

   $b.text_field(:name, password).exists? found object, but...

  When I run:
   $b.text_field(:name, password).set(pass_word)  I get error msg:

  WIN32OLERuntimeError: focus
     OLE error code:800A083E in htmlfile
       Can't move focus to the control because it is invisible, not
  enabled, or of a type that does not accept the focus.
     HRESULT error code:0x80020009
       Exception occurred.
     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/
  input_elements.rb:370:in `method_missing'
     C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/
  input_elements.rb:370:in `set'
     IPN_Login.rb:56:in `test_login'

  Still unable to access object, even though Watir thinks it exists.
  Further thoughts?

  On Oct 7, 8:09 am, CJ Romberger c...@wildwoodinteractive.com wrote:
   I have it working like this:

   password = 'abc123'
   b.text_field(:name, mock_password).set password

   If that doesn't work, you might want to just test to see if watir can
  even
   see that element.

   if b.text_field(:name, mock_password).exists?
     puts Password field exists
   else
     puts Password field missing
   end

   On Wed, Oct 6, 2010 at 8:54 PM, Eric Mathiesen mathiese...@gmail.com
  wrote:

Could also try .flash to ensure you are calling the right element from
orb.  Css has given me some challenges in the past..  also try emwith
(;index, #).set

On Oct 6, 2010 6:35 PM, blkjk blkjk@gmail.com wrote:

I am trying to type text to a Login textfield. And when I use this
code to access it:

         $b.text_field(:name, 'mockPassword').set('abc123')        No
password actually gets typed into the textfield and used for login.

Here is what Firebug caught to identify the textfield:
input type=text

  onfocus=jQuery('#mockPassword').hide();jQuery('#password').show();jQuery('
  #password').focus();
value=password name=mockPassword id=mockPassword style=width:
150px; color: rgb(204, 204, 204); class=input

Any thoughts on how to make the code type the password into that
field? And yes, I wish to make it work on both IE8  FF3.5 in Win7.
Thanks for any help on this.

--
Before posting, please readhttp://watir.com/support. In short: search
before you ask, be nice.

watir-general@googlegroups.com
   http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
 legroups.com
  http://groups.google.com/group/watir-generalwatir-general+unsubscribe...

 --
Before posting, please readhttp://watir.com/support. In short: search
before you ask, be nice.

watir-general@googlegroups.com
   http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog
 legroups.com
  watir-general%2bunsubscr...@goog legroups.com

   --
   CJ Romberger
   Wildwood Interactivehttp://www.wildwoodinteractive.com/
   512.732.9916

   PLEASE NOTE: I only check this email address about once a day!  If you're
  a
   client, the fastest way to reach me is to login to Basecamp, OR email
   supp...@wildwoodinteractive.com.

   If you're NOT a client?  Why not become one!?  :)

  --
  Before posting, please readhttp://watir.com/support. In short: search
  before you ask, be nice.

  watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
  watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Difficulty typing into textfield

2010-10-13 Thread Ethan
I can answer what the developers were thinking, I believe - they were
thinking I want the word 'password' to be seen in this text field as a sort
of help-text, but when the user clicks on it, I want that to disappear and
their password should show up as asterisks like normal. If the field is
initially a password type, then the default value shows up as '*'s rather
than as 'password'. Various sites do various bits of hackery (usually CSS)
to have help-text-like stuff in password fields. This is one of the poorer
implementations I've seen.

On Wed, Oct 13, 2010 at 17:08, Jarmo Pertman jarm...@gmail.com wrote:

 Or try
 $b.text_field(:name, password).value = text

 instead of #set, without invoking any JavaScript events. Also, you
 could ask from the developers what the hell did they think with that
 onfocus event when they did that :)

 Jarmo Pertman
 -
 IT does really matter - http://www.itreallymatters.net


 On Oct 11, 9:31 pm, Ethan notet...@gmail.com wrote:
  your onfocus event seems to do some interesting stuff.
 
 
 onfocus=jQuery('#mockPassword').hide();jQuery('#password').show();jQuery('
 #password').focus();
 
  basically, you're not going to be able to type into the mockPassword
 field
  because when you focus it, it hides itself and gives you another field.
 try
  something like:
 
  $b.text_field(:name, mockPassword).focus
  $b.text_field(:name, password).set(pass_word)
 
 
 
  On Mon, Oct 11, 2010 at 14:02, blkjk blkjk@gmail.com wrote:
   Thx.
 
$b.text_field(:name, password).exists? found object, but...
 
   When I run:
$b.text_field(:name, password).set(pass_word)  I get error msg:
 
   WIN32OLERuntimeError: focus
  OLE error code:800A083E in htmlfile
Can't move focus to the control because it is invisible, not
   enabled, or of a type that does not accept the focus.
  HRESULT error code:0x80020009
Exception occurred.
  C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/
   input_elements.rb:370:in `method_missing'
  C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/
   input_elements.rb:370:in `set'
  IPN_Login.rb:56:in `test_login'
 
   Still unable to access object, even though Watir thinks it exists.
   Further thoughts?
 
   On Oct 7, 8:09 am, CJ Romberger c...@wildwoodinteractive.com wrote:
I have it working like this:
 
password = 'abc123'
b.text_field(:name, mock_password).set password
 
If that doesn't work, you might want to just test to see if watir can
   even
see that element.
 
if b.text_field(:name, mock_password).exists?
  puts Password field exists
else
  puts Password field missing
end
 
On Wed, Oct 6, 2010 at 8:54 PM, Eric Mathiesen 
 mathiese...@gmail.com
   wrote:
 
 Could also try .flash to ensure you are calling the right element
 from
 orb.  Css has given me some challenges in the past..  also try
 emwith
 (;index, #).set
 
 On Oct 6, 2010 6:35 PM, blkjk blkjk@gmail.com wrote:
 
 I am trying to type text to a Login textfield. And when I use this
 code to access it:
 
  $b.text_field(:name, 'mockPassword').set('abc123')
  No
 password actually gets typed into the textfield and used for login.
 
 Here is what Firebug caught to identify the textfield:
 input type=text
 
  
 onfocus=jQuery('#mockPassword').hide();jQuery('#password').show();jQuery('
   #password').focus();
 value=password name=mockPassword id=mockPassword
 style=width:
 150px; color: rgb(204, 204, 204); class=input
 
 Any thoughts on how to make the code type the password into that
 field? And yes, I wish to make it work on both IE8  FF3.5 in Win7.
 Thanks for any help on this.
 
 --
 Before posting, please readhttp://watir.com/support. In short:
 search
 before you ask, be nice.
 
 watir-general@googlegroups.com
http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com
 watir-general%2bunsubscr...@goog legroups.com
   
 http://groups.google.com/group/watir-generalwatir-general+unsubscribe...
 
  --
 Before posting, please readhttp://watir.com/support. In short:
 search
 before you ask, be nice.
 
 watir-general@googlegroups.com
http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com
 watir-general%2bunsubscr...@goog legroups.com
   watir-general%2bunsubscr...@goog legroups.com
 
--
CJ Romberger
Wildwood Interactivehttp://www.wildwoodinteractive.com/
512.732.9916
 
PLEASE NOTE: I only check this email address about once a day!  If
 you're
   a
client, the fastest way to reach me is to login to Basecamp, OR email
supp...@wildwoodinteractive.com.
 
If you're NOT a client?  Why not become one!?  :)
 
   --
   Before posting, please readhttp://watir.com/support. In short: search
   before you ask, be nice.
 
   

[wtr-general] Re: Difficulty typing into textfield

2010-10-11 Thread blkjk
Thx.

  $b.text_field(:name, password).exists? found object, but...

When I run:
 $b.text_field(:name, password).set(pass_word)  I get error msg:

WIN32OLERuntimeError: focus
OLE error code:800A083E in htmlfile
  Can't move focus to the control because it is invisible, not
enabled, or of a type that does not accept the focus.
HRESULT error code:0x80020009
  Exception occurred.
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/
input_elements.rb:370:in `method_missing'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/
input_elements.rb:370:in `set'
IPN_Login.rb:56:in `test_login'

Still unable to access object, even though Watir thinks it exists.
Further thoughts?


On Oct 7, 8:09 am, CJ Romberger c...@wildwoodinteractive.com wrote:
 I have it working like this:

 password = 'abc123'
 b.text_field(:name, mock_password).set password

 If that doesn't work, you might want to just test to see if watir can even
 see that element.

 if b.text_field(:name, mock_password).exists?
   puts Password field exists
 else
   puts Password field missing
 end

 On Wed, Oct 6, 2010 at 8:54 PM, Eric Mathiesen mathiese...@gmail.comwrote:





  Could also try .flash to ensure you are calling the right element from
  orb.  Css has given me some challenges in the past..  also try emwith
  (;index, #).set

  On Oct 6, 2010 6:35 PM, blkjk blkjk@gmail.com wrote:

  I am trying to type text to a Login textfield. And when I use this
  code to access it:

           $b.text_field(:name, 'mockPassword').set('abc123')        No
  password actually gets typed into the textfield and used for login.

  Here is what Firebug caught to identify the textfield:
  input type=text

  onfocus=jQuery('#mockPassword').hide();jQuery('#password').show();jQuery(' 
  #password').focus();
  value=password name=mockPassword id=mockPassword style=width:
  150px; color: rgb(204, 204, 204); class=input

  Any thoughts on how to make the code type the password into that
  field? And yes, I wish to make it work on both IE8  FF3.5 in Win7.
  Thanks for any help on this.

  --
  Before posting, please readhttp://watir.com/support. In short: search
  before you ask, be nice.

  watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
  watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscribe...

   --
  Before posting, please readhttp://watir.com/support. In short: search
  before you ask, be nice.

  watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
  watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog 
  legroups.com

 --
 CJ Romberger
 Wildwood Interactivehttp://www.wildwoodinteractive.com/
 512.732.9916

 PLEASE NOTE: I only check this email address about once a day!  If you're a
 client, the fastest way to reach me is to login to Basecamp, OR email
 supp...@wildwoodinteractive.com.

 If you're NOT a client?  Why not become one!?  :)

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Difficulty typing into textfield

2010-10-11 Thread Ethan
your onfocus event seems to do some interesting stuff.

onfocus=jQuery('#mockPassword').hide();jQuery('#password').show();jQuery('#password').focus();

basically, you're not going to be able to type into the mockPassword field
because when you focus it, it hides itself and gives you another field. try
something like:

$b.text_field(:name, mockPassword).focus
$b.text_field(:name, password).set(pass_word)


On Mon, Oct 11, 2010 at 14:02, blkjk blkjk@gmail.com wrote:

 Thx.

  $b.text_field(:name, password).exists? found object, but...

 When I run:
  $b.text_field(:name, password).set(pass_word)  I get error msg:

 WIN32OLERuntimeError: focus
OLE error code:800A083E in htmlfile
  Can't move focus to the control because it is invisible, not
 enabled, or of a type that does not accept the focus.
HRESULT error code:0x80020009
  Exception occurred.
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/
 input_elements.rb:370:in `method_missing'
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/
 input_elements.rb:370:in `set'
IPN_Login.rb:56:in `test_login'

 Still unable to access object, even though Watir thinks it exists.
 Further thoughts?


 On Oct 7, 8:09 am, CJ Romberger c...@wildwoodinteractive.com wrote:
  I have it working like this:
 
  password = 'abc123'
  b.text_field(:name, mock_password).set password
 
  If that doesn't work, you might want to just test to see if watir can
 even
  see that element.
 
  if b.text_field(:name, mock_password).exists?
puts Password field exists
  else
puts Password field missing
  end
 
  On Wed, Oct 6, 2010 at 8:54 PM, Eric Mathiesen mathiese...@gmail.com
 wrote:
 
 
 
 
 
   Could also try .flash to ensure you are calling the right element from
   orb.  Css has given me some challenges in the past..  also try emwith
   (;index, #).set
 
   On Oct 6, 2010 6:35 PM, blkjk blkjk@gmail.com wrote:
 
   I am trying to type text to a Login textfield. And when I use this
   code to access it:
 
$b.text_field(:name, 'mockPassword').set('abc123')No
   password actually gets typed into the textfield and used for login.
 
   Here is what Firebug caught to identify the textfield:
   input type=text
 
  
 onfocus=jQuery('#mockPassword').hide();jQuery('#password').show();jQuery('
 #password').focus();
   value=password name=mockPassword id=mockPassword style=width:
   150px; color: rgb(204, 204, 204); class=input
 
   Any thoughts on how to make the code type the password into that
   field? And yes, I wish to make it work on both IE8  FF3.5 in Win7.
   Thanks for any help on this.
 
   --
   Before posting, please readhttp://watir.com/support. In short: search
   before you ask, be nice.
 
   watir-general@googlegroups.com
  http://groups.google.com/group/watir-general
   watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com
 http://groups.google.com/group/watir-generalwatir-general+unsubscribe...
 
--
   Before posting, please readhttp://watir.com/support. In short: search
   before you ask, be nice.
 
   watir-general@googlegroups.com
  http://groups.google.com/group/watir-general
   watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com
 watir-general%2bunsubscr...@goog legroups.com
 
  --
  CJ Romberger
  Wildwood Interactivehttp://www.wildwoodinteractive.com/
  512.732.9916
 
  PLEASE NOTE: I only check this email address about once a day!  If you're
 a
  client, the fastest way to reach me is to login to Basecamp, OR email
  supp...@wildwoodinteractive.com.
 
  If you're NOT a client?  Why not become one!?  :)

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com