Re: [wtr-general] Watir::Exception::ObjectReadOnlyException after update selenium-webdriver and watir-webdriver

2010-10-13 Thread Jari Bakken
On Wed, Oct 13, 2010 at 10:43 AM, grzegorz.smaj...@gmail.com
grzegorz.smaj...@gmail.com wrote:
 Hi,

 I have updated recently watir-webdriver to 0.1.1 and selenium-
 webdriver to 0.0.29 and all my test failed on textboxes with:

 Watir::Exception::ObjectReadOnlyException

 It was not such a case in watir-webdriver 0.1.0 and selenium-webdriver
 0.0.28.

 Can anyone advice?


Interesting. Could you provide some example HTML + Ruby code that will
reproduce the problem? What browser are you using?

-- 
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: Recent Stack Overflow Questions Tagged Watir

2010-10-13 Thread Željko Filipin
http://stackoverflow.com/questions/3917253/firewatir-firewatir-scripts-to-select-a-item-from-the-drop-down

-- 
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


[wtr-general] Re: Watir::Exception::ObjectReadOnlyException after update selenium-webdriver and watir-webdriver

2010-10-13 Thread grzegorz.smaj...@gmail.com
Hi Guys,

I have found the solution and problem.

I was requiring the watir-webdriver from github and I did not pull the
updates from there for few days.

Meantime I have updated gems (watir-webdriver and selenium-
webdrivers). And I think that crashed.. but I am not 100% sure about
that.

So pointing to gems or pulling changes from GitHub solves my problem.

Br,
Grzegorz




On Oct 13, 10:49 am, Jari Bakken jari.bak...@gmail.com wrote:
 On Wed, Oct 13, 2010 at 10:43 AM, grzegorz.smaj...@gmail.com

 grzegorz.smaj...@gmail.com wrote:
  Hi,

  I have updated recently watir-webdriver to 0.1.1 and selenium-
  webdriver to 0.0.29 and all my test failed on textboxes with:

  Watir::Exception::ObjectReadOnlyException

  It was not such a case in watir-webdriver 0.1.0 and selenium-webdriver
  0.0.28.

  Can anyone advice?

 Interesting. Could you provide some example HTML + Ruby code that will
 reproduce the problem? What browser are you using?

-- 
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] Unble to run the test suit

2010-10-13 Thread Charley Baker
You've pasted the same file in twice, I'm assuming that was a mistake.
Where's your actual test case content?

-c\


On Wed, Oct 13, 2010 at 6:26 AM, Uma bhatuma2...@gmail.com wrote:
 I have created these two files  one is the test script and the other
 one is suit where want to execute all the tc’s. But some how “class
 TC_test_suit” doesn’t get invoked.

 test script file is (admin_test_case.rb) contains

 require rubygems
 require watir
 require watir/testcase
  require 'test/unit'

 test_site= http://blros002:8080;
  test_user = uma
  test_pwd = 1234
 module AdminTestcase
  #include Test::Unit::Assertions
 def login_portal
  ie.goto test_site
  ie.text_field(:name,_58_login).set(test_user)
  ie.text_field(:name,_58_password).set(test_pwd )
  ie.button(:value,Sign In).click
 end

 def click_on_controlPanel
  ie.image(:src, /HIEPortalNew-theme/images/newhieportal/
 adminUI.png).click
  ie.link(:text, Control Panel).click
 end
 def update_password_policy
  ie .link(:text,Password Policies).click
  ie.link(:text,Default Password Policy).click
 #if ff.checkbox(:name,_129_changeRequiredCheckbox, on)==false
  # puts checkbox is not checked
  #ie.checkbox(:id,_129_changeRequiredCheckbox).set
  ie.checkbox(:id,_129_changeRequiredCheckbox).set 'ON'
  puts ChangeRequiredCheckbox is checked
  ie.button(:value, Save).click
  end
 def add_user
  ie.link(:text, Users).click
  ie.link(:text, Add).clicks
 sleep(2)
  ie.text_field(:id, _125_screenName).set(testuser)
  ie.text_field(:id,
 _125_emailAddress).set(uma.hemachan...@misys.com)
  ie.text_field(:id, _125_firstName).set(Test)
  ie.text_field(:id, _125_lastName).set(User)
  ie.button(:value, Save).click
 if
  ie.span(:text, You have entered invalid data. Please try
 again.).exist
  puts Unable to save the user
  ie.button(:value, Cancel).click
 else
  puts User saved successfully
 end
 end
 def add_organization
  ie.link(:text, Organizations).click
  ie.link(:text, Add).click
  ie.text_field(:id, _126_name).set(TESTorg)
 end
 end
 --

 and test suit is (admin_test_suit.rb) contains

 require rubygems
 require watir
 require watir/testcase
  require 'test/unit'

 test_site= http://blros002:8080;
  test_user = uma
  test_pwd = 1234
 module AdminTestcase
  #include Test::Unit::Assertions
 def login_portal
  ie.goto test_site
  ie.text_field(:name,_58_login).set(test_user)
  ie.text_field(:name,_58_password).set(test_pwd )
  ie.button(:value,Sign In).click
 end

 def click_on_controlPanel
  ie.image(:src, /HIEPortalNew-theme/images/newhieportal/
 adminUI.png).click
  ie.link(:text, Control Panel).click
 end
 def update_password_policy
  ie .link(:text,Password Policies).click
  ie.link(:text,Default Password Policy).click
 #if ff.checkbox(:name,_129_changeRequiredCheckbox, on)==false
  # puts checkbox is not checked
  #ie.checkbox(:id,_129_changeRequiredCheckbox).set
  ie.checkbox(:id,_129_changeRequiredCheckbox).set 'ON'
  puts ChangeRequiredCheckbox is checked
  ie.button(:value, Save).click
  end
 def add_user
  ie.link(:text, Users).click
  ie.link(:text, Add).clicks
 sleep(2)
  ie.text_field(:id, _125_screenName).set(testuser)
  ie.text_field(:id,
 _125_emailAddress).set(uma.hemachan...@misys.com)
  ie.text_field(:id, _125_firstName).set(Test)
  ie.text_field(:id, _125_lastName).set(User)
  ie.button(:value, Save).click
 if
  ie.span(:text, You have entered invalid data. Please try
 again.).exist
  puts Unable to save the user
  ie.button(:value, Cancel).click
 else
  puts User saved successfully
 end
 end
 def add_organization
  ie.link(:text, Organizations).click
  ie.link(:text, Add).click
  ie.text_field(:id, _126_name).set(TESTorg)
 end
 end
 --



 The log says:
ruby admin_test_suit.rb
 e:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.6/lib/watir/waiter.rb:
 59:in `wait_until': Timed out after 60.421 seconds.
 (Watir::Exception::TimeOutException)
                from e:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.6/
 lib/watir/waiter.rb:80:in `wait_until'
                from e:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/
 watir/ie-process.rb:20:in `window'
                from e:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/
 watir/ie-class.rb:119:in `_new_process_init'
                from e:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/
 watir/ie-class.rb:113:in `new_process'
                from admin_test_suit.rb:9
Exit code: 1

 Can any one spend time on this to rectify ?

 Thanks in advance.
 -Uma.

 --
 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


[wtr-general] Re: Manipulate Keystrokes on a MAC

2010-10-13 Thread Ozzi
thanks for your help guys but i kinda cheated in the end... I kinda
wrote some javascript to disable the popup that appears when clicking
on one of the button...
i wrote:
@browser.execute_script('window.alert = function () {};')

this then turns off the alert boxes for the window...
it works for me and now i can run my scripts on all environments that
are available to me...

Thanks for all the help guys,

Usman Hussain

On Oct 12, 1:06 pm, ayan ayan.ni...@gmail.com wrote:
 You can try using Apple Script.

 On Mon, Oct 11, 2010 at 2:01 PM, Željko Filipin 



 zeljko.fili...@wa-research.ch wrote:
  On Thu, Oct 7, 2010 at 6:35 PM, Eric Mathiesen mathiese...@gmail.com
  wrote:
   DONT BUY A MAC.

  As far as I know, a lot of Watir developers use a Mac. (But it looks like
  nobody has to send keystrokes.)

  Željko

  --
   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

-- 
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: Manipulate Keystrokes on a MAC

2010-10-13 Thread CJ Romberger
Ozzi, you're using this on your Mac?  What browser environment?

I have Firefox and Chrome on my Mac, and I'm dead stuck on dismissing
Javascript alert boxes.

CJ

On Wed, Oct 13, 2010 at 10:11 AM, Ozzi usmanhhuss...@gmail.com wrote:

 thanks for your help guys but i kinda cheated in the end... I kinda
 wrote some javascript to disable the popup that appears when clicking
 on one of the button...
 i wrote:
 @browser.execute_script('window.alert = function () {};')

 this then turns off the alert boxes for the window...
 it works for me and now i can run my scripts on all environments that
 are available to me...

 Thanks for all the help guys,

 Usman Hussain

 On Oct 12, 1:06 pm, ayan ayan.ni...@gmail.com wrote:
  You can try using Apple Script.
 
  On Mon, Oct 11, 2010 at 2:01 PM, Željko Filipin 
 
 
 
  zeljko.fili...@wa-research.ch wrote:
   On Thu, Oct 7, 2010 at 6:35 PM, Eric Mathiesen mathiese...@gmail.com
   wrote:
DONT BUY A MAC.
 
   As far as I know, a lot of Watir developers use a Mac. (But it looks
 like
   nobody has to send keystrokes.)
 
   Željko
 
   --
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

 --
 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




-- 
CJ Romberger
Wildwood Interactive
http://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


[wtr-general] Re: Read PDF with Ruby?????

2010-10-13 Thread Chuck van der Linden
That project is 4 years old and it does not appear to have had any
updates since it originally went up on Rubyforge.  Not sure if that's
a good thing (code is solid) or a bad thing (developer lost interested
and moved on to other things).

This group is specific to Watir, not general Ruby questions, since
this has nothing to do with Watir, you'd be better off seeking help in
a general Ruby forum, or from the developer of that gem

In general, given the error you are getting, it appears that it can't
find the pdf file to open.  Are you sure the PDF file is located in
the root of your C: drive and that you've spelled the name right, etc.

On Oct 12, 4:49 am, Saurabh Gupta saurabhgupta...@gmail.com wrote:
 Hello Friends,

 I am trying to read PDF file with the help of ruby.

 I started with download the latest pdftk i.e. pdftk-1.43-win.zip file
 fromhttp://www.pdflabs.com/docs/install-pdftk/and extract it into
 system 32 directory and install it from cmd.

 Then download the Xpdf version xpdf-3.02pl2-win32which is another
 command line pdf manipulation program 
 fromhttp://www.foolabs.com/xpdf/download.html
 and put it also into system 32 directory.

 Then Install the required gem for the pdf toolkit i.e pdf-
 toolkit-0.5.0.gem from http://rubyforge.org/frs/?group_id=2345; and
 install it:
 gem install c:\pdf-toolkit-0.5.0.gem.

 And then jump to the text edior of ruby and write the code to read the
 pdf file:
         require 'rubygems'
         require 'pdf/toolkit'

         my_pdf = PDF::Toolkit.open(c:\\sample.pdf)
         text = my_pdf.to_text.read
         puts text

 But when I execute it, error comes:
 c:/ruby/lib/ruby/gems/1.8/gems/pdf-toolkit-0.5.0/lib/pdf/toolkit.rb:
 181:in `popen': No such file or directory - pdftk c:\sample.pdf
 dump_data output - dont_ask (Errno::ENOENT)

 Thanks in Advance.
 Saurabh Gupta
 saurabhgupta...@gmail.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


[wtr-general] Re: Version Problem

2010-10-13 Thread Chuck van der Linden
Sorry but in terms of having the information needed to troubleshoot
this with you,  the description of behavior not working is
insufficient for me or almost anyone else to have any kind of guess as
to what you might need to do.

Please provide URL (if public)
Sample of code where the issue is occuring
Description of what actually happens, any error messages, etc.

Failing that please remove your tin-foil hat, so we can train the
watir-brainscanner {tm} on your location and read your mind to figure
out what it is you actually meant to tell us

On Oct 12, 2:53 am, sivam sivamma...@gmail.com wrote:
 Hi,
     Previously i was using IE6. At that time for handling pop up
 message i used click_no_wait. It worked fine. Now i upgraded my
 version to IE8. But now that click_no_wait is not working. Can any one
 help into this.

 Thanks in advance.

-- 
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


[wtr-general] Re: Overridden [] method

2010-10-13 Thread Jarmo Pertman
What version of Watir are you using?

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


On Oct 12, 4:56 am, Ekin Han nbkhic...@gmail.com wrote:
 Hi all,

 I want to overridden [] method of class TableRow, so I write some codes like
 this:
 class Watir::TableRow
   alias_method(:old_one, '[]'.to_sym)

   def [](desc)
     if desc.class == 'String'
       index = desc.match(/\d+/)[0]
       if index
         old_one(index.to_i)
       else
         old_one(1)
       end
     else
       old_one(desc)
     end
   end
 end

 But it does work, the error is NameError:undefined method [] for class
 'Watir::TableRow'.

 How should I modify it to make it work?

-- 
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


[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


[wtr-general] Re: Version Problem

2010-10-13 Thread Jarmo Pertman
Also, don't forget to tell us what version of Watir are you using?

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


On Oct 13, 9:07 pm, Chuck van der Linden sqa...@gmail.com wrote:
 Sorry but in terms of having the information needed to troubleshoot
 this with you,  the description of behavior not working is
 insufficient for me or almost anyone else to have any kind of guess as
 to what you might need to do.

 Please provide URL (if public)
 Sample of code where the issue is occuring
 Description of what actually happens, any error messages, etc.

 Failing that please remove your tin-foil hat, so we can train the
 watir-brainscanner {tm} on your location and read your mind to figure
 out what it is you actually meant to tell us

 On Oct 12, 2:53 am, sivam sivamma...@gmail.com wrote:



  Hi,
      Previously i was using IE6. At that time for handling pop up
  message i used click_no_wait. It worked fine. Now i upgraded my
  version to IE8. But now that click_no_wait is not working. Can any one
  help into this.

  Thanks in advance.

-- 
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: Version Problem

2010-10-13 Thread sivam
Hi I am using watir1.6.5. I have used the following code

   ie.frame(:index, 3).button(:id, '#ICSave').click_no_wait
   sleep(30)
   txt = ie.clickprompt()
   puts txt
   Watir::Waiter::wait_until {ie.frame(:index,3).text.include? Enter
any information. }

This code is working fine in IE6.. But for IE8 this is not clicking
that save button(First line of the code). Could you please give me the
solution for this 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


[wtr-general] Re: Version Problem

2010-10-13 Thread sivam
Hi I am using watir1.6.5. I have used the following code

   ie.frame(:index, 3).button(:id, '#ICSave').click_no_wait
   sleep(30)
   txt = ie.clickprompt()
   puts txt
   Watir::Waiter::wait_until {ie.frame(:index,3).text.include? Enter
any information. }

This code is working fine in IE6.. But for IE8 this is not clicking
that save button(First line of the code). Could you please give me the
solution for this one.

On Oct 13, 11:07 pm, Chuck van der Linden sqa...@gmail.com wrote:
 Sorry but in terms of having the information needed to troubleshoot
 this with you,  the description of behavior not working is
 insufficient for me or almost anyone else to have any kind of guess as
 to what you might need to do.

 Please provide URL (if public)
 Sample of code where the issue is occuring
 Description of what actually happens, any error messages, etc.

 Failing that please remove your tin-foil hat, so we can train the
 watir-brainscanner {tm} on your location and read your mind to figure
 out what it is you actually meant to tell us

 On Oct 12, 2:53 am, sivam sivamma...@gmail.com wrote:



  Hi,
      Previously i was using IE6. At that time for handling pop up
  message i used click_no_wait. It worked fine. Now i upgraded my
  version to IE8. But now that click_no_wait is not working. Can any one
  help into this.

  Thanks in advance.- Hide quoted text -

 - Show quoted text -

-- 
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


[wtr-general] Re: Version Problem

2010-10-13 Thread sivam
Hi I am using watir1.6.5. I have used the following code

   ie.frame(:index, 3).button(:id, '#ICSave').click_no_wait
   sleep(30)
   txt = ie.clickprompt()
   puts txt
   Watir::Waiter::wait_until {ie.frame(:index,3).text.include? Enter
any information. }

This code is working fine in IE6.. But for IE8 this is not clicking
that save button(First line of the code). Could you please give me the
solution for this one.

On Oct 14, 2:17 am, Jarmo Pertman jarm...@gmail.com wrote:
 Also, don't forget to tell us what version of Watir are you using?

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

 On Oct 13, 9:07 pm, Chuck van der Linden sqa...@gmail.com wrote:



  Sorry but in terms of having the information needed to troubleshoot
  this with you,  the description of behavior not working is
  insufficient for me or almost anyone else to have any kind of guess as
  to what you might need to do.

  Please provide URL (if public)
  Sample of code where the issue is occuring
  Description of what actually happens, any error messages, etc.

  Failing that please remove your tin-foil hat, so we can train the
  watir-brainscanner {tm} on your location and read your mind to figure
  out what it is you actually meant to tell us

  On Oct 12, 2:53 am, sivam sivamma...@gmail.com wrote:

   Hi,
       Previously i was using IE6. At that time for handling pop up
   message i used click_no_wait. It worked fine. Now i upgraded my
   version to IE8. But now that click_no_wait is not working. Can any one
   help into this.

   Thanks in advance.- Hide quoted text -

 - Show quoted text -

-- 
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] Unble to run the test suit

2010-10-13 Thread Uma Bhat
I am so sorry for the mistake

Here is the testcase file

require rubygems
require watir
require watir/testcase
  require 'test/unit'

test_site= http://blros002:8080;
  test_user = uma
  test_pwd = 1234
module AdminTestcase
 #include Test::Unit::Assertions
def login_portal
  ie.goto test_site
  ie.text_field(:name,_58_login).set(test_user)
  ie.text_field(:name,_58_password).set(test_pwd )
  ie.button(:value,Sign In).click
end

def click_on_controlPanel
  ie.image(:src,
/HIEPortalNew-theme/images/newhieportal/adminUI.png).click
  ie.link(:text, Control Panel).click
end
def update_password_policy
 ie .link(:text,Password Policies).click
 ie.link(:text,Default Password Policy).click
#if ff.checkbox(:name,_129_changeRequiredCheckbox, on)==false
 # puts checkbox is not checked
 #ie.checkbox(:id,_129_changeRequiredCheckbox).set
 ie.checkbox(:id,_129_changeRequiredCheckbox).set 'ON'
 puts ChangeRequiredCheckbox is checked
 ie.button(:value, Save).click
 end
def add_user
 ie.link(:text, Users).click
 ie.link(:text, Add).clicks
sleep(2)
 ie.text_field(:id, _125_screenName).set(testuser)
 ie.text_field(:id, _125_emailAddress).set(uma.hemachan...@misys.com)
 ie.text_field(:id, _125_firstName).set(Test)
 ie.text_field(:id, _125_lastName).set(User)
 ie.button(:value, Save).click
if
  ie.span(:text, You have entered invalid data. Please try again.).exist
  puts Unable to save the user
  ie.button(:value, Cancel).click
else
  puts User saved successfully
end
end
def add_organization
  ie.link(:text, Organizations).click
  ie.link(:text, Add).click
  ie.text_field(:id, _126_name).set(TESTorg)
end
end
---
Here is my suit file.


#dir = File.dirname(__FILE__)
require rubygems
require admin_test_case.rb
require 'test/unit'
require watir
require watir/testcase

$ie = Watir::IE.new_process
$ie.set_fast_speed

#sleep(5)

class TC_test_suit  Watir::TestCase
include AdminTestcase
def test_01
 login_portal
 click_on_controlPanel
 update_password_policy
 add_user
 add_organization
end
end
-


  The log says:
 ruby admin_test_suit.rb
  e:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.6/lib/watir/waiter.rb:
  59:in `wait_until': Timed out after 60.421 seconds.
  (Watir::Exception::TimeOutException)
 from e:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.6/
  lib/watir/waiter.rb:80:in `wait_until'
 from e:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/
  watir/ie-process.rb:20:in `window'
 from e:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/
  watir/ie-class.rb:119:in `_new_process_init'
 from e:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/
  watir/ie-class.rb:113:in `new_process'
 from admin_test_suit.rb:9
 Exit code: 1
 
 
  Thanks in advance.
  -Uma.
 



-- 
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