[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

Hi,

When I try run any script I still get the following error message:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_ex
ists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:323:in `set' from script2.rb:6

Here is my script:

require 'watir'
ie = Watir::IE.new

ie.goto(http://www.google.com;)
sleep(10)
ie.text_field(:name,q).set(watir)
sleep(10)


Here is my other scripts:

#require 'rubygems'
require 'watir'

   # set a variable
   test_site = 'http://www.google.com'

   # open the IE browser
   ie = Watir::IE.new

   puts Step 1: go to the test site:  + test_site
   ie.goto(test_site)
   puts   Action: entered  + test_site +  in the address bar.

   puts Action: WaitForPageToLoad

   sleep(10)

   #puts Click on the Gmail Link

   #ie.link(id, '').click

   #puts Action: Enter InfoQ into text box
   ie.text_field(:name,q).set(watir)
   sleep(10)
   #puts Action: Click Search Button
   #ie.button(:name, btnG).click

As far as I know my script should be fine as I am following the watir
commans correctly but everytime I execute the script I get the error
mentioned above.

Thanks




On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote:
 Hi,

 Please try to use slep(10) commands.

 It means

 ie.goto(htp://google.com)
 sleep(10)
 ie.text_field(:name,q).set(Raveendran)
 sleep(10)
 .
 .
 .
  I hope it works now. Rit ?





 On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote:

  Another Error From Command Prompt:

  ## Beginning of test: Google search
  Step 1: go to the test site:http://www.google.com
   Action: enteredhttp://www.google.comin the address bar.
  Action: WaitForPageToLoad
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
  `assert_exists': Unable to locate element, using :name,
  q (Watir::Exception::UnknownObje
  ctException)
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:284:in `enabled?'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:56:in `assert_enabled'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  input_elements.rb:323:in `set'
          from script1.rb:28

  I never had any problems when I was using watir on windows xp, I am
  not 100% sure but is there any configuration for windows vista or any
  known issue because when using IE Developer Toolbar I am able to find
  the link q on the page

  On Nov 11, 12:49 pm, tester86 sagar.am...@gmail.com wrote:
   Bret,

   My script is going to the google URL, but for some reason it cannot
   find the text box. I have tried all the examples but I get the
   following output:

   broswer.url
   browser.text
   script1.rb:9: undefined method `enter_text' for #Watir::IE:0x8b291e0
   (NoMethodError)

   same for when I use ie.text_field(:name, q).set(pickaxe)

   Do you have any idea why it cannot find that text box?

   On Nov 10, 1:09 pm, Bret Pettichord b...@pettichord.com wrote:

My guess is that the browser is not actually on the google page at this
point. You could use statements like this to help troubleshoot:

  puts browser.text
  puts browser.url
  puts browser.title

Bret

tester86 wrote:
 Thanks for all the help I managed to get ruby and watir all up and
 running. But I have a question, when I was using cucumber I get this
 error message and they told me to put this post in the watir group:

 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
 `assert_exists': Unable to locate element, using :name,
 q (Watir::Exception::UnknownObje
 ctException)
       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:284:in `enabled?'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:56:in `assert_enabled'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements.rb:323:in `set'
         from script1.rb:8

 When you have a watir script why cannot find the text box and the
 search box for google.My script is still the same. Is there some
  other
 syntax that I need to use?

--
Bret Pettichord
Lead Developer, Watir,www.watir.com
Blog,www.io.com/~wazmo/bloghttp://www.io.com/%7Ewazmo/blog
Twitter,www.twitter.com/bpettichord-Hidequoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -

 --
 Regards,
 P.Raveendranhttp://raveendran.wordpress.com- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General 

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread Tiffany Fodor

The error message is saying that it can't find the text field with the
name 'q'.  For some reason, it doesn't exist in the browser contained
by your variable ie.  Are you sure that your browser is on the page
you think it is?

One way to troubleshoot this is with an irb session.  Run your test
and when it fails, open an irb session in a command prompt.  Then try
the following commands:

require 'watir'
ie = Watir::IE.find(:title, /Google/)
ie.text_field(:name,'q').exists?

I've copied both of your scripts into an irb session and they ran
without any problems - even without the sleep commands (you shouldn't
need those).  Try stepping through your scripts, line by line in irb
so you can watch what happens in with each step.

Hope this helps,

-Tiffany



On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote:
 Hi,

 When I try run any script I still get the following error message:

 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
 `assert_ex
 ists': Unable to locate element, using :name,
 q (Watir::Exception::UnknownObjectException)
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:284:in `enabled?'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:56:in `assert_enabled'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements
 .rb:323:in `set' from script2.rb:6

 Here is my script:

 require 'watir'
 ie = Watir::IE.new

 ie.goto(http://www.google.com;)
 sleep(10)
 ie.text_field(:name,q).set(watir)
 sleep(10)

 Here is my other scripts:

 #require 'rubygems'
 require 'watir'

    # set a variable
    test_site = 'http://www.google.com'

    # open the IE browser
    ie = Watir::IE.new

    puts Step 1: go to the test site:  + test_site
    ie.goto(test_site)
    puts   Action: entered  + test_site +  in the address bar.

    puts Action: WaitForPageToLoad

    sleep(10)

    #puts Click on the Gmail Link

    #ie.link(id, '').click

    #puts Action: Enter InfoQ into text box
    ie.text_field(:name,q).set(watir)
    sleep(10)
    #puts Action: Click Search Button
    #ie.button(:name, btnG).click

 As far as I know my script should be fine as I am following the watir
 commans correctly but everytime I execute the script I get the error
 mentioned above.

 Thanks

 On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote:

  Hi,

  Please try to use slep(10) commands.

  It means

  ie.goto(htp://google.com)
  sleep(10)
  ie.text_field(:name,q).set(Raveendran)
  sleep(10)
  .
  .
  .
   I hope it works now. Rit ?

  On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote:

   Another Error From Command Prompt:

   ## Beginning of test: Google search
   Step 1: go to the test site:http://www.google.com
    Action: enteredhttp://www.google.cominthe address bar.
   Action: WaitForPageToLoad
   c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
   `assert_exists': Unable to locate element, using :name,
   q (Watir::Exception::UnknownObje
   ctException)
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   element.rb:284:in `enabled?'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   element.rb:56:in `assert_enabled'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   input_elements.rb:323:in `set'
           from script1.rb:28

   I never had any problems when I was using watir on windows xp, I am
   not 100% sure but is there any configuration for windows vista or any
   known issue because when using IE Developer Toolbar I am able to find
   the link q on the page

   On Nov 11, 12:49 pm, tester86 sagar.am...@gmail.com wrote:
Bret,

My script is going to the google URL, but for some reason it cannot
find the text box. I have tried all the examples but I get the
following output:

broswer.url
browser.text
script1.rb:9: undefined method `enter_text' for #Watir::IE:0x8b291e0
(NoMethodError)

same for when I use ie.text_field(:name, q).set(pickaxe)

Do you have any idea why it cannot find that text box?

On Nov 10, 1:09 pm, Bret Pettichord b...@pettichord.com wrote:

 My guess is that the browser is not actually on the google page at 
 this
 point. You could use statements like this to help troubleshoot:

   puts browser.text
   puts browser.url
   puts browser.title

 Bret

 tester86 wrote:
  Thanks for all the help I managed to get ruby and watir all up and
  running. But I have a question, when I was using cucumber I get this
  error message and they told me to put this post in the watir group:

  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
  `assert_exists': Unable to locate element, using :name,
  q (Watir::Exception::UnknownObje
  ctException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:284:in `enabled?'
          

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

Thanks for you input Tiffany but when I run the script and execute in
IRB I get the following error message:

NameError: undefined local variable or method `ie' for main:Object

Is there something I have to set to intialize IE? On what operating
system did you execute the script since I have several installs of
ruby and watir and nothing is working for me.

When I execute the script it opens a new window, on that window
nothing happens, then it goes to my other window and loads up google
and throw the error message unable to find q then in IRB it shows me
this message. Do you have any idea on what is happening as I have been
through all the basic examples but none of my scripts are working,
even though they are very low level.

When I try to do ie.text_contains(valueX) if throws me back an error
stating undefined method for contains. Am I missing something in my
set up or is it because of vista OS?

Thanks

On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote:
 The error message is saying that it can't find the text field with the
 name 'q'.  For some reason, it doesn't exist in the browser contained
 by your variable ie.  Are you sure that your browser is on the page
 you think it is?

 One way to troubleshoot this is with an irb session.  Run your test
 and when it fails, open an irb session in a command prompt.  Then try
 the following commands:

 require 'watir'
 ie = Watir::IE.find(:title, /Google/)
 ie.text_field(:name,'q').exists?

 I've copied both of your scripts into an irb session and they ran
 without any problems - even without the sleep commands (you shouldn't
 need those).  Try stepping through your scripts, line by line in irb
 so you can watch what happens in with each step.

 Hope this helps,

 -Tiffany

 On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote:



  Hi,

  When I try run any script I still get the following error message:

  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
  `assert_ex
  ists': Unable to locate element, using :name,
  q (Watir::Exception::UnknownObjectException)
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:284:in `enabled?'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:56:in `assert_enabled'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  input_elements
  .rb:323:in `set' from script2.rb:6

  Here is my script:

  require 'watir'
  ie = Watir::IE.new

  ie.goto(http://www.google.com;)
  sleep(10)
  ie.text_field(:name,q).set(watir)
  sleep(10)

  Here is my other scripts:

  #require 'rubygems'
  require 'watir'

     # set a variable
     test_site = 'http://www.google.com'

     # open the IE browser
     ie = Watir::IE.new

     puts Step 1: go to the test site:  + test_site
     ie.goto(test_site)
     puts   Action: entered  + test_site +  in the address bar.

     puts Action: WaitForPageToLoad

     sleep(10)

     #puts Click on the Gmail Link

     #ie.link(id, '').click

     #puts Action: Enter InfoQ into text box
     ie.text_field(:name,q).set(watir)
     sleep(10)
     #puts Action: Click Search Button
     #ie.button(:name, btnG).click

  As far as I know my script should be fine as I am following the watir
  commans correctly but everytime I execute the script I get the error
  mentioned above.

  Thanks

  On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote:

   Hi,

   Please try to use slep(10) commands.

   It means

   ie.goto(htp://google.com)
   sleep(10)
   ie.text_field(:name,q).set(Raveendran)
   sleep(10)
   .
   .
   .
    I hope it works now. Rit ?

   On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote:

Another Error From Command Prompt:

## Beginning of test: Google search
Step 1: go to the test site:http://www.google.com
 Action: enteredhttp://www.google.comintheaddress bar.
Action: WaitForPageToLoad
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_exists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObje
ctException)
       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:323:in `set'
        from script1.rb:28

I never had any problems when I was using watir on windows xp, I am
not 100% sure but is there any configuration for windows vista or any
known issue because when using IE Developer Toolbar I am able to find
the link q on the page

On Nov 11, 12:49 pm, tester86 sagar.am...@gmail.com wrote:
 Bret,

 My script is going to the google URL, but for some reason it cannot
 find the text box. I have tried all the examples but I get the
 following output:

 broswer.url
 browser.text
 

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

When I type the commans into IRB here is was I get as output:

irb(main):001:0 require 'Watir'
= true
irb(main):002:0 test_site='www.google.com'
= www.google.com
irb(main):003:0 IE=Watir::IE.new
= #Watir::IE:0x3e09a40 @url_list=[about:blank], @typingspeed=0.08,
@pause_af
ter_wait=0.1, @error_checkers=[], @page_container=#Watir::IE:
0x3e09a40 ..., @a
ctiveObjectHighLightColor=yellow, @ole_object=nil,
@rexmlDomobject=nil, @logge
r=#Watir::DefaultLogger:0x3e033e8 @level=2,
@formatter=#Logger::SimpleFormatte
r:0x3e03244 @datetime_format=%d-%b-%Y %H:%M:%S,
@default_formatter=#Logger::
Formatter:0x3e03334 @datetime_format=nil, @progname=nil,
@logdev=#Logger::LogD
evice:0x3e032e4 @mutex=#Logger::LogDevice::LogDeviceMutex:0x3e03280
@mon_enteri
ng_queue=[], @mon_count=0, @mon_owner=nil, @mon_waiting_queue=[],
@dev=#IO:0x3
866ad4, @shift_size=nil, @shift_age=nil, @filename=nil,
@down_load_time=0.515
, @type_keys=true, @speed=:slow, @ie=#WIN32OLE:0x3e03460
irb(main):004:0 IE.goto(test_site)
= 0.234
irb(main):005:0 IE.text_field(:name,q).set(watir)
Watir::Exception::UnknownObjectException: Unable to locate element,
using :name,
 q
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:52:
in `assert_exists'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284
:in `enabled?'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:
in `assert_enabled'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:323:in `set'
from (irb):5


But in my previous post I executed the script..which failed then
logged into IRB and it was at google.
--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

Here is an output from IRB when I try to execute script line by line:

irb(main):001:0 require 'Watir'
= true
irb(main):002:0 test_site='www.google.com'
= www.google.com
irb(main):003:0 IE=Watir::IE.new
= #Watir::IE:0x3e09a40 @url_list=[about:blank], @typingspeed=0.08,
@pause_af
ter_wait=0.1, @error_checkers=[], @page_container=#Watir::IE:
0x3e09a40 ..., @a
ctiveObjectHighLightColor=yellow, @ole_object=nil,
@rexmlDomobject=nil, @logge
r=#Watir::DefaultLogger:0x3e033e8 @level=2,
@formatter=#Logger::SimpleFormatte
r:0x3e03244 @datetime_format=%d-%b-%Y %H:%M:%S,
@default_formatter=#Logger::
Formatter:0x3e03334 @datetime_format=nil, @progname=nil,
@logdev=#Logger::LogD
evice:0x3e032e4 @mutex=#Logger::LogDevice::LogDeviceMutex:0x3e03280
@mon_enteri
ng_queue=[], @mon_count=0, @mon_owner=nil, @mon_waiting_queue=[],
@dev=#IO:0x3
866ad4, @shift_size=nil, @shift_age=nil, @filename=nil,
@down_load_time=0.515
, @type_keys=true, @speed=:slow, @ie=#WIN32OLE:0x3e03460
irb(main):004:0 IE.goto(test_site)
= 0.234
irb(main):005:0 IE.text_field(:name,q).set(watir)
Watir::Exception::UnknownObjectException: Unable to locate element,
using :name,
 q
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:52:
in `assert_exists'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284
:in `enabled?'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:
in `assert_enabled'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:323:in `set'
from (irb):5

On Nov 12, 12:47 pm, tester86 sagar.am...@gmail.com wrote:
 Thanks for you input Tiffany but when I run the script and execute in
 IRB I get the following error message:

 NameError: undefined local variable or method `ie' for main:Object

 Is there something I have to set to intialize IE? On what operating
 system did you execute the script since I have several installs of
 ruby and watir and nothing is working for me.

 When I execute the script it opens a new window, on that window
 nothing happens, then it goes to my other window and loads up google
 and throw the error message unable to find q then in IRB it shows me
 this message. Do you have any idea on what is happening as I have been
 through all the basic examples but none of my scripts are working,
 even though they are very low level.

 When I try to do ie.text_contains(valueX) if throws me back an error
 stating undefined method for contains. Am I missing something in my
 set up or is it because of vista OS?

 Thanks

 On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote:



  The error message is saying that it can't find the text field with the
  name 'q'.  For some reason, it doesn't exist in the browser contained
  by your variable ie.  Are you sure that your browser is on the page
  you think it is?

  One way to troubleshoot this is with an irb session.  Run your test
  and when it fails, open an irb session in a command prompt.  Then try
  the following commands:

  require 'watir'
  ie = Watir::IE.find(:title, /Google/)
  ie.text_field(:name,'q').exists?

  I've copied both of your scripts into an irb session and they ran
  without any problems - even without the sleep commands (you shouldn't
  need those).  Try stepping through your scripts, line by line in irb
  so you can watch what happens in with each step.

  Hope this helps,

  -Tiffany

  On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote:

   Hi,

   When I try run any script I still get the following error message:

   c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
   `assert_ex
   ists': Unable to locate element, using :name,
   q (Watir::Exception::UnknownObjectException)
           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   element.rb:284:in `enabled?'
           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   element.rb:56:in `assert_enabled'
           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   input_elements
   .rb:323:in `set' from script2.rb:6

   Here is my script:

   require 'watir'
   ie = Watir::IE.new

   ie.goto(http://www.google.com;)
   sleep(10)
   ie.text_field(:name,q).set(watir)
   sleep(10)

   Here is my other scripts:

   #require 'rubygems'
   require 'watir'

      # set a variable
      test_site = 'http://www.google.com'

      # open the IE browser
      ie = Watir::IE.new

      puts Step 1: go to the test site:  + test_site
      ie.goto(test_site)
      puts   Action: entered  + test_site +  in the address bar.

      puts Action: WaitForPageToLoad

      sleep(10)

      #puts Click on the Gmail Link

      #ie.link(id, '').click

      #puts Action: Enter InfoQ into text box
      ie.text_field(:name,q).set(watir)
      sleep(10)
      #puts Action: Click Search Button
      #ie.button(:name, btnG).click

   As far as I know my script should be fine as I am following the watir
   commans correctly but everytime I 

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread Tiffany Fodor

Are you running your command prompt session with administrator
privileges?  I had a problem when I moved to Vista where two browsers
were being opened.  Try the suggestions Bill Agee gave me:

http://tinyurl.com/ygn4fpx

Hope this helps!

-Tiffany


On Nov 12, 11:47 am, tester86 sagar.am...@gmail.com wrote:
 Thanks for you input Tiffany but when I run the script and execute in
 IRB I get the following error message:

 NameError: undefined local variable or method `ie' for main:Object

 Is there something I have to set to intialize IE? On what operating
 system did you execute the script since I have several installs of
 ruby and watir and nothing is working for me.

 When I execute the script it opens a new window, on that window
 nothing happens, then it goes to my other window and loads up google
 and throw the error message unable to find q then in IRB it shows me
 this message. Do you have any idea on what is happening as I have been
 through all the basic examples but none of my scripts are working,
 even though they are very low level.

 When I try to do ie.text_contains(valueX) if throws me back an error
 stating undefined method for contains. Am I missing something in my
 set up or is it because of vista OS?

 Thanks

 On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote:

  The error message is saying that it can't find the text field with the
  name 'q'.  For some reason, it doesn't exist in the browser contained
  by your variable ie.  Are you sure that your browser is on the page
  you think it is?

  One way to troubleshoot this is with an irb session.  Run your test
  and when it fails, open an irb session in a command prompt.  Then try
  the following commands:

  require 'watir'
  ie = Watir::IE.find(:title, /Google/)
  ie.text_field(:name,'q').exists?

  I've copied both of your scripts into an irb session and they ran
  without any problems - even without the sleep commands (you shouldn't
  need those).  Try stepping through your scripts, line by line in irb
  so you can watch what happens in with each step.

  Hope this helps,

  -Tiffany

  On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote:

   Hi,

   When I try run any script I still get the following error message:

   c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
   `assert_ex
   ists': Unable to locate element, using :name,
   q (Watir::Exception::UnknownObjectException)
           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   element.rb:284:in `enabled?'
           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   element.rb:56:in `assert_enabled'
           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   input_elements
   .rb:323:in `set' from script2.rb:6

   Here is my script:

   require 'watir'
   ie = Watir::IE.new

   ie.goto(http://www.google.com;)
   sleep(10)
   ie.text_field(:name,q).set(watir)
   sleep(10)

   Here is my other scripts:

   #require 'rubygems'
   require 'watir'

      # set a variable
      test_site = 'http://www.google.com'

      # open the IE browser
      ie = Watir::IE.new

      puts Step 1: go to the test site:  + test_site
      ie.goto(test_site)
      puts   Action: entered  + test_site +  in the address bar.

      puts Action: WaitForPageToLoad

      sleep(10)

      #puts Click on the Gmail Link

      #ie.link(id, '').click

      #puts Action: Enter InfoQ into text box
      ie.text_field(:name,q).set(watir)
      sleep(10)
      #puts Action: Click Search Button
      #ie.button(:name, btnG).click

   As far as I know my script should be fine as I am following the watir
   commans correctly but everytime I execute the script I get the error
   mentioned above.

   Thanks

   On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote:

Hi,

Please try to use slep(10) commands.

It means

ie.goto(htp://google.com)
sleep(10)
ie.text_field(:name,q).set(Raveendran)
sleep(10)
.
.
.
 I hope it works now. Rit ?

On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com 
wrote:

 Another Error From Command Prompt:

 ## Beginning of test: Google search
 Step 1: go to the test site:http://www.google.com
  Action: enteredhttp://www.google.comintheaddressbar.
 Action: WaitForPageToLoad
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
 `assert_exists': Unable to locate element, using :name,
 q (Watir::Exception::UnknownObje
 ctException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:284:in `enabled?'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:56:in `assert_enabled'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements.rb:323:in `set'
         from script1.rb:28

 I never had any problems when I was using watir on windows xp, I am
 not 100% sure but is there any 

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

Thanks for your help! It turn out that Bill's helped actually helped
me out. I have to run command prompt as administrator. My script is
now running finally after two days of debugging watir.

Thanks for all your help!



On Nov 12, 1:55 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Are you running your command prompt session with administrator
 privileges?  I had a problem when I moved to Vista where two browsers
 were being opened.  Try the suggestions Bill Agee gave me:

 http://tinyurl.com/ygn4fpx

 Hope this helps!

 -Tiffany

 On Nov 12, 11:47 am, tester86 sagar.am...@gmail.com wrote:



  Thanks for you input Tiffany but when I run the script and execute in
  IRB I get the following error message:

  NameError: undefined local variable or method `ie' for main:Object

  Is there something I have to set to intialize IE? On what operating
  system did you execute the script since I have several installs of
  ruby and watir and nothing is working for me.

  When I execute the script it opens a new window, on that window
  nothing happens, then it goes to my other window and loads up google
  and throw the error message unable to find q then in IRB it shows me
  this message. Do you have any idea on what is happening as I have been
  through all the basic examples but none of my scripts are working,
  even though they are very low level.

  When I try to do ie.text_contains(valueX) if throws me back an error
  stating undefined method for contains. Am I missing something in my
  set up or is it because of vista OS?

  Thanks

  On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote:

   The error message is saying that it can't find the text field with the
   name 'q'.  For some reason, it doesn't exist in the browser contained
   by your variable ie.  Are you sure that your browser is on the page
   you think it is?

   One way to troubleshoot this is with an irb session.  Run your test
   and when it fails, open an irb session in a command prompt.  Then try
   the following commands:

   require 'watir'
   ie = Watir::IE.find(:title, /Google/)
   ie.text_field(:name,'q').exists?

   I've copied both of your scripts into an irb session and they ran
   without any problems - even without the sleep commands (you shouldn't
   need those).  Try stepping through your scripts, line by line in irb
   so you can watch what happens in with each step.

   Hope this helps,

   -Tiffany

   On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote:

Hi,

When I try run any script I still get the following error message:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_ex
ists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObjectException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:323:in `set' from script2.rb:6

Here is my script:

require 'watir'
ie = Watir::IE.new

ie.goto(http://www.google.com;)
sleep(10)
ie.text_field(:name,q).set(watir)
sleep(10)

Here is my other scripts:

#require 'rubygems'
require 'watir'

   # set a variable
   test_site = 'http://www.google.com'

   # open the IE browser
   ie = Watir::IE.new

   puts Step 1: go to the test site:  + test_site
   ie.goto(test_site)
   puts   Action: entered  + test_site +  in the address bar.

   puts Action: WaitForPageToLoad

   sleep(10)

   #puts Click on the Gmail Link

   #ie.link(id, '').click

   #puts Action: Enter InfoQ into text box
   ie.text_field(:name,q).set(watir)
   sleep(10)
   #puts Action: Click Search Button
   #ie.button(:name, btnG).click

As far as I know my script should be fine as I am following the watir
commans correctly but everytime I execute the script I get the error
mentioned above.

Thanks

On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote:

 Hi,

 Please try to use slep(10) commands.

 It means

 ie.goto(htp://google.com)
 sleep(10)
 ie.text_field(:name,q).set(Raveendran)
 sleep(10)
 .
 .
 .
  I hope it works now. Rit ?

 On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com 
 wrote:

  Another Error From Command Prompt:

  ## Beginning of test: Google search
  Step 1: go to the test site:http://www.google.com
   Action: enteredhttp://www.google.comintheaddressbar.
  Action: WaitForPageToLoad
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
  `assert_exists': Unable to locate element, using :name,
  q (Watir::Exception::UnknownObje
  ctException)
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-11 Thread tester86

Bret,

My script is going to the google URL, but for some reason it cannot
find the text box. I have tried all the examples but I get the
following output:

broswer.url
browser.text
script1.rb:9: undefined method `enter_text' for #Watir::IE:0x8b291e0
(NoMethodError)

same for when I use ie.text_field(:name, q).set(pickaxe)

Do you have any idea why it cannot find that text box?

On Nov 10, 1:09 pm, Bret Pettichord b...@pettichord.com wrote:
 My guess is that the browser is not actually on the google page at this
 point. You could use statements like this to help troubleshoot:

   puts browser.text
   puts browser.url
   puts browser.title

 Bret





 tester86 wrote:
  Thanks for all the help I managed to get ruby and watir all up and
  running. But I have a question, when I was using cucumber I get this
  error message and they told me to put this post in the watir group:

  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
  `assert_exists': Unable to locate element, using :name,
  q (Watir::Exception::UnknownObje
  ctException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:284:in `enabled?'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:56:in `assert_enabled'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  input_elements.rb:323:in `set'
          from script1.rb:8

  When you have a watir script why cannot find the text box and the
  search box for google.My script is still the same. Is there some other
  syntax that I need to use?

 --
 Bret Pettichord
 Lead Developer, Watir,www.watir.com
 Blog,www.io.com/~wazmo/blog
 Twitter,www.twitter.com/bpettichord- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

I removed include Watir now my script is:

require 'watir'
require 'rubygems'
#require win32ole


ie = Watir::IE.new
ie.goto(http://google.com;)

ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).click


I still get the same error message. I am using watir 1.4.1. Below is
my ruby version

C:\rubyruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

I have done gem update prevsiously, gem system updates but nothing
works. Any ideas on what I can do to get a basic script up and running
using watir?


On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:
 Hi,

 Add first line -- require 'rubygems'
 Remove line no.2 -- include Watir

 I hope it works now. If its not working then Please provide more details
 about Watir Verison and Ruby version.

 Thanks





 On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com wrote:

  I am trying to run a watir script:

  require 'watir'
  include Watir

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).submit

  when I run it from command line ruby filename.rb I get the following
  error message:

  c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
  unknown proper
  ty or method `document' (WIN32OLERuntimeError)
     HRESULT error code:0x800706ba
       The RPC server is unavailable.    from c:/ruby/lib/ruby/
  site_ruby/1.8/watir.rb:1336:in `document'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
  `getContainerContents'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
  `getObject'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
  `initialize'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
  `text_field'
         from script1.rb:6

  Any Ideas.?

 --
 Regards,
 P.Raveendranhttp://raveendran.wordpress.com- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

watir 1.4.1

On Nov 9, 9:46 pm, Bret Pettichord b...@pettichord.com wrote:
 What version of Watir are you using?





 tester86 wrote:
  I am trying to run a watir script:

  require 'watir'
  include Watir

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).submit

  when I run it from command line ruby filename.rb I get the following
  error message:

  c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
  unknown proper
  ty or method `document' (WIN32OLERuntimeError)
      HRESULT error code:0x800706ba
        The RPC server is unavailable.    from c:/ruby/lib/ruby/
  site_ruby/1.8/watir.rb:1336:in `document'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
  `getContainerContents'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
  `getObject'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
  `initialize'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
  `text_field'
          from script1.rb:6

  Any Ideas.?

 --
 Bret Pettichord
 Lead Developer, Watir,www.watir.com
 Blog,www.io.com/~wazmo/blog
 Twitter,www.twitter.com/bpettichord- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

Here is the list of my local gems (just incase its helps)

*** LOCAL GEMS ***

actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (2.3.4)
builder (2.1.2)
camping (1.5.180)
commonwatir (1.6.2)
cucumber (0.4.3)
diff-lcs (1.1.2)
firewatir (1.6.2)
fxri (0.3.7, 0.3.6)
fxruby (1.6.19, 1.6.12)
hoe (2.3.3)
hoe-seattlerb (1.2.1)
hpricot (0.8.2, 0.6)
json_pure (1.1.9)
log4r (1.1.2, 1.0.5)
markaby (0.5)
metaid (1.0)
minitest (1.4.2)
polyglot (0.2.9)
rack (1.0.1)
rails (2.3.4)
rake (0.8.7, 0.7.3)
rspec (1.2.9)
rubyforge (2.0.3)
rubygems-update (1.3.5)
s4t-utils (1.0.4)
session (2.4.0)
sources (0.0.1)
term-ansicolor (1.0.4)
test-spec (0.10.0)
treetop (1.4.2)
user-choices (1.1.6)
watir (1.6.2)
win32-api (1.4.5, 1.0.4)
win32-clipboard (0.5.2, 0.4.3)
win32-dir (0.3.5, 0.3.2)
win32-eventlog (0.5.2, 0.4.6)
win32-file (0.6.3, 0.5.4)
win32-file-stat (1.3.4, 1.2.7)
win32-process (0.6.1, 0.5.3)
win32-sapi (0.1.5, 0.1.4)
win32-sound (0.4.2, 0.4.1)
win32console (1.2.0)
win32ole-pp (1.2.0)
windows-api (0.4.0, 0.2.0)
windows-pr (1.0.8, 0.7.2)
xml-simple (1.0.12)

Is there any gem that I am missing that is causing the error?

On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:
 I removed include Watir now my script is:

 require 'watir'
 require 'rubygems'
 #require win32ole

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).click

 I still get the same error message. I am using watir 1.4.1. Below is
 my ruby version

 C:\rubyruby --version
 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

 I have done gem update prevsiously, gem system updates but nothing
 works. Any ideas on what I can do to get a basic script up and running
 using watir?

 On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:



  Hi,

  Add first line -- require 'rubygems'
  Remove line no.2 -- include Watir

  I hope it works now. If its not working then Please provide more details
  about Watir Verison and Ruby version.

  Thanks

  On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com wrote:

   I am trying to run a watir script:

   require 'watir'
   include Watir

   ie = Watir::IE.new
   ie.goto(http://google.com;)

   ie.text_field(:name, q).set(watir)
   ie.button(:name, btnG).submit

   when I run it from command line ruby filename.rb I get the following
   error message:

   c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
   unknown proper
   ty or method `document' (WIN32OLERuntimeError)
      HRESULT error code:0x800706ba
        The RPC server is unavailable.    from c:/ruby/lib/ruby/
   site_ruby/1.8/watir.rb:1336:in `document'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
   `getContainerContents'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
   `getObject'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
   `initialize'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
   `text_field'
          from script1.rb:6

   Any Ideas.?

  --
  Regards,
  P.Raveendranhttp://raveendran.wordpress.com-Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread Jason Trebilcock
In a previous email, you indicate that you're running Watir 1.4.1.  But, the
below indicates that you're on 1.6.2.

In any case, I tried running your code and it worked fine. (What happens if
you switch the require 'watir' and require 'rubygems' lines? Could that be
the source of your problem? Further, do you have the variable RUBYOPT set in
your environment variables with the value of 'rubygems'?)

That is:
require 'watir'
require 'rubygems'
#require win32ole


ie = Watir::IE.new
ie.goto(http://google.com;)

ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).click

On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote:


 Here is the list of my local gems (just incase its helps)

 *** LOCAL GEMS ***

 actionmailer (2.3.4)
 actionpack (2.3.4)
 activerecord (2.3.4)
 activeresource (2.3.4)
 activesupport (2.3.4)
 builder (2.1.2)
 camping (1.5.180)
 commonwatir (1.6.2)
 cucumber (0.4.3)
 diff-lcs (1.1.2)
 firewatir (1.6.2)
 fxri (0.3.7, 0.3.6)
 fxruby (1.6.19, 1.6.12)
 hoe (2.3.3)
 hoe-seattlerb (1.2.1)
 hpricot (0.8.2, 0.6)
 json_pure (1.1.9)
 log4r (1.1.2, 1.0.5)
 markaby (0.5)
 metaid (1.0)
 minitest (1.4.2)
 polyglot (0.2.9)
 rack (1.0.1)
 rails (2.3.4)
 rake (0.8.7, 0.7.3)
 rspec (1.2.9)
 rubyforge (2.0.3)
 rubygems-update (1.3.5)
 s4t-utils (1.0.4)
 session (2.4.0)
 sources (0.0.1)
 term-ansicolor (1.0.4)
 test-spec (0.10.0)
 treetop (1.4.2)
 user-choices (1.1.6)
 watir (1.6.2)
 win32-api (1.4.5, 1.0.4)
 win32-clipboard (0.5.2, 0.4.3)
 win32-dir (0.3.5, 0.3.2)
 win32-eventlog (0.5.2, 0.4.6)
 win32-file (0.6.3, 0.5.4)
 win32-file-stat (1.3.4, 1.2.7)
 win32-process (0.6.1, 0.5.3)
 win32-sapi (0.1.5, 0.1.4)
 win32-sound (0.4.2, 0.4.1)
 win32console (1.2.0)
 win32ole-pp (1.2.0)
 windows-api (0.4.0, 0.2.0)
 windows-pr (1.0.8, 0.7.2)
 xml-simple (1.0.12)

 Is there any gem that I am missing that is causing the error?

 On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:
  I removed include Watir now my script is:
 
  require 'watir'
  require 'rubygems'
  #require win32ole
 
  ie = Watir::IE.new
  ie.goto(http://google.com;)
 
  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).click
 
  I still get the same error message. I am using watir 1.4.1. Below is
  my ruby version
 
  C:\rubyruby --version
  ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
 
  I have done gem update prevsiously, gem system updates but nothing
  works. Any ideas on what I can do to get a basic script up and running
  using watir?
 
  On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:
 
 
 
   Hi,
 
   Add first line -- require 'rubygems'
   Remove line no.2 -- include Watir
 
   I hope it works now. If its not working then Please provide more
 details
   about Watir Verison and Ruby version.
 
   Thanks
 
   On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com
 wrote:
 
I am trying to run a watir script:
 
require 'watir'
include Watir
 
ie = Watir::IE.new
ie.goto(http://google.com;)
 
ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).submit
 
when I run it from command line ruby filename.rb I get the following
error message:
 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
unknown proper
ty or method `document' (WIN32OLERuntimeError)
   HRESULT error code:0x800706ba
 The RPC server is unavailable.from c:/ruby/lib/ruby/
site_ruby/1.8/watir.rb:1336:in `document'
   from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
`getContainerContents'
   from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
`getObject'
   from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
`initialize'
   from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
   from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
`text_field'
   from script1.rb:6
 
Any Ideas.?
 
   --
   Regards,
   P.Raveendranhttp://raveendran.wordpress.com-Hide quoted text -
 
   - Show quoted text -- Hide quoted text -
 
  - Show quoted text -
 


--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread Željko Filipin
On Tue, Nov 10, 2009 at 3:10 PM, tester86 sagar.am...@gmail.com wrote:
 watir 1.4.1

Please uninstall it and install watir via gem. Ask if you need help with
that.

Željko
--
watir.com - community manager
watirpodcast.com - host

--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

This morning I just upgraded to watir 1.6.2 and I also switched the
lines but I still got the same output.

On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com
wrote:
 In a previous email, you indicate that you're running Watir 1.4.1.  But, the
 below indicates that you're on 1.6.2.

 In any case, I tried running your code and it worked fine. (What happens if
 you switch the require 'watir' and require 'rubygems' lines? Could that be
 the source of your problem? Further, do you have the variable RUBYOPT set in
 your environment variables with the value of 'rubygems'?)

 That is:
 require 'watir'
 require 'rubygems'
 #require win32ole

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).click



 On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote:

  Here is the list of my local gems (just incase its helps)

  *** LOCAL GEMS ***

  actionmailer (2.3.4)
  actionpack (2.3.4)
  activerecord (2.3.4)
  activeresource (2.3.4)
  activesupport (2.3.4)
  builder (2.1.2)
  camping (1.5.180)
  commonwatir (1.6.2)
  cucumber (0.4.3)
  diff-lcs (1.1.2)
  firewatir (1.6.2)
  fxri (0.3.7, 0.3.6)
  fxruby (1.6.19, 1.6.12)
  hoe (2.3.3)
  hoe-seattlerb (1.2.1)
  hpricot (0.8.2, 0.6)
  json_pure (1.1.9)
  log4r (1.1.2, 1.0.5)
  markaby (0.5)
  metaid (1.0)
  minitest (1.4.2)
  polyglot (0.2.9)
  rack (1.0.1)
  rails (2.3.4)
  rake (0.8.7, 0.7.3)
  rspec (1.2.9)
  rubyforge (2.0.3)
  rubygems-update (1.3.5)
  s4t-utils (1.0.4)
  session (2.4.0)
  sources (0.0.1)
  term-ansicolor (1.0.4)
  test-spec (0.10.0)
  treetop (1.4.2)
  user-choices (1.1.6)
  watir (1.6.2)
  win32-api (1.4.5, 1.0.4)
  win32-clipboard (0.5.2, 0.4.3)
  win32-dir (0.3.5, 0.3.2)
  win32-eventlog (0.5.2, 0.4.6)
  win32-file (0.6.3, 0.5.4)
  win32-file-stat (1.3.4, 1.2.7)
  win32-process (0.6.1, 0.5.3)
  win32-sapi (0.1.5, 0.1.4)
  win32-sound (0.4.2, 0.4.1)
  win32console (1.2.0)
  win32ole-pp (1.2.0)
  windows-api (0.4.0, 0.2.0)
  windows-pr (1.0.8, 0.7.2)
  xml-simple (1.0.12)

  Is there any gem that I am missing that is causing the error?

  On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:
   I removed include Watir now my script is:

   require 'watir'
   require 'rubygems'
   #require win32ole

   ie = Watir::IE.new
   ie.goto(http://google.com;)

   ie.text_field(:name, q).set(watir)
   ie.button(:name, btnG).click

   I still get the same error message. I am using watir 1.4.1. Below is
   my ruby version

   C:\rubyruby --version
   ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

   I have done gem update prevsiously, gem system updates but nothing
   works. Any ideas on what I can do to get a basic script up and running
   using watir?

   On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:

Hi,

Add first line -- require 'rubygems'
Remove line no.2 -- include Watir

I hope it works now. If its not working then Please provide more
  details
about Watir Verison and Ruby version.

Thanks

On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com
  wrote:

 I am trying to run a watir script:

 require 'watir'
 include Watir

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).submit

 when I run it from command line ruby filename.rb I get the following
 error message:

 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
 unknown proper
 ty or method `document' (WIN32OLERuntimeError)
    HRESULT error code:0x800706ba
      The RPC server is unavailable.    from c:/ruby/lib/ruby/
 site_ruby/1.8/watir.rb:1336:in `document'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
 `getContainerContents'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
 `getObject'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
 `initialize'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
 `text_field'
        from script1.rb:6

 Any Ideas.?

--
Regards,
P.Raveendranhttp://raveendran.wordpress.com-Hidequoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

Previously, I did instal watir via the gem version 1.4.1 then
yesterday I download watir according to some material I found  online.
This morning I upgraded to watir 1.6.2. and executed my script again
but I got the same error message. Do you think I should uninstall ruby
and that will remove all my gems and everything and start again..I
did that before but it did not work.

On Nov 10, 9:03 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Nov 10, 2009 at 3:10 PM, tester86 sagar.am...@gmail.com wrote:
  watir 1.4.1

 Please uninstall it and install watir via gem. Ask if you need help with
 that.

 Željko
 --
 watir.com - community manager
 watirpodcast.com - host
--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread Bret Pettichord

I am wondering if maybe this is a permissions problem. Are you using 
Windows 7?

It would help if you printed the error and stack trace that you are now 
getting.

Bret

tester86 wrote:
 This morning I just upgraded to watir 1.6.2 and I also switched the
 lines but I still got the same output.

 On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com
 wrote:
   
 In a previous email, you indicate that you're running Watir 1.4.1.  But, the
 below indicates that you're on 1.6.2.

 In any case, I tried running your code and it worked fine. (What happens if
 you switch the require 'watir' and require 'rubygems' lines? Could that be
 the source of your problem? Further, do you have the variable RUBYOPT set in
 your environment variables with the value of 'rubygems'?)

 That is:
 require 'watir'
 require 'rubygems'
 #require win32ole

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).click



 On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote:

 
 Here is the list of my local gems (just incase its helps)
   
 *** LOCAL GEMS ***
   
 actionmailer (2.3.4)
 actionpack (2.3.4)
 activerecord (2.3.4)
 activeresource (2.3.4)
 activesupport (2.3.4)
 builder (2.1.2)
 camping (1.5.180)
 commonwatir (1.6.2)
 cucumber (0.4.3)
 diff-lcs (1.1.2)
 firewatir (1.6.2)
 fxri (0.3.7, 0.3.6)
 fxruby (1.6.19, 1.6.12)
 hoe (2.3.3)
 hoe-seattlerb (1.2.1)
 hpricot (0.8.2, 0.6)
 json_pure (1.1.9)
 log4r (1.1.2, 1.0.5)
 markaby (0.5)
 metaid (1.0)
 minitest (1.4.2)
 polyglot (0.2.9)
 rack (1.0.1)
 rails (2.3.4)
 rake (0.8.7, 0.7.3)
 rspec (1.2.9)
 rubyforge (2.0.3)
 rubygems-update (1.3.5)
 s4t-utils (1.0.4)
 session (2.4.0)
 sources (0.0.1)
 term-ansicolor (1.0.4)
 test-spec (0.10.0)
 treetop (1.4.2)
 user-choices (1.1.6)
 watir (1.6.2)
 win32-api (1.4.5, 1.0.4)
 win32-clipboard (0.5.2, 0.4.3)
 win32-dir (0.3.5, 0.3.2)
 win32-eventlog (0.5.2, 0.4.6)
 win32-file (0.6.3, 0.5.4)
 win32-file-stat (1.3.4, 1.2.7)
 win32-process (0.6.1, 0.5.3)
 win32-sapi (0.1.5, 0.1.4)
 win32-sound (0.4.2, 0.4.1)
 win32console (1.2.0)
 win32ole-pp (1.2.0)
 windows-api (0.4.0, 0.2.0)
 windows-pr (1.0.8, 0.7.2)
 xml-simple (1.0.12)
   
 Is there any gem that I am missing that is causing the error?
   
 On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:
   
 I removed include Watir now my script is:
 
 require 'watir'
 require 'rubygems'
 #require win32ole
 
 ie = Watir::IE.new
 ie.goto(http://google.com;)
 
 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).click
 
 I still get the same error message. I am using watir 1.4.1. Below is
 my ruby version
 
 C:\rubyruby --version
 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
 
 I have done gem update prevsiously, gem system updates but nothing
 works. Any ideas on what I can do to get a basic script up and running
 using watir?
 
 On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:
 
 Hi,
   
 Add first line -- require 'rubygems'
 Remove line no.2 -- include Watir
   
 I hope it works now. If its not working then Please provide more
   
 details
   
 about Watir Verison and Ruby version.
   
 Thanks
   
 On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com
   
 wrote:
   
 I am trying to run a watir script:
 
 require 'watir'
 include Watir
 
 ie = Watir::IE.new
 ie.goto(http://google.com;)
 
 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).submit
 
 when I run it from command line ruby filename.rb I get the following
 error message:
 
 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
 unknown proper
 ty or method `document' (WIN32OLERuntimeError)
HRESULT error code:0x800706ba
  The RPC server is unavailable.from c:/ruby/lib/ruby/
 site_ruby/1.8/watir.rb:1336:in `document'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
 `getContainerContents'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
 `getObject'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
 `initialize'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
 `text_field'
from script1.rb:6
 
 Any Ideas.?
 
 --
 Regards,
 P.Raveendranhttp://raveendran.wordpress.com-Hidequoted text -
   
 - Show quoted text -- Hide quoted text -
   
 - Show quoted text -- Hide quoted text -
 
 - Show quoted text -
 
 
   


-- 
Bret Pettichord
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to 

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

I do not think that it is a permission an issue and I am using windows
vista but going to be working on windows 7 soon. I do not know how to
get a stack trace from my output. In my previous posts shows the error
message that I get in command prompt.

Question:

1. How do I check my envirnoment variables for ruby?


On Nov 10, 9:38 am, Bret Pettichord b...@pettichord.com wrote:
 I am wondering if maybe this is a permissions problem. Are you using
 Windows 7?

 It would help if you printed the error and stack trace that you are now
 getting.

 Bret





 tester86 wrote:
  This morning I just upgraded to watir 1.6.2 and I also switched the
  lines but I still got the same output.

  On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com
  wrote:

  In a previous email, you indicate that you're running Watir 1.4.1.  But, 
  the
  below indicates that you're on 1.6.2.

  In any case, I tried running your code and it worked fine. (What happens if
  you switch the require 'watir' and require 'rubygems' lines? Could that be
  the source of your problem? Further, do you have the variable RUBYOPT set 
  in
  your environment variables with the value of 'rubygems'?)

  That is:
  require 'watir'
  require 'rubygems'
  #require win32ole

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).click

  On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote:

  Here is the list of my local gems (just incase its helps)

  *** LOCAL GEMS ***

  actionmailer (2.3.4)
  actionpack (2.3.4)
  activerecord (2.3.4)
  activeresource (2.3.4)
  activesupport (2.3.4)
  builder (2.1.2)
  camping (1.5.180)
  commonwatir (1.6.2)
  cucumber (0.4.3)
  diff-lcs (1.1.2)
  firewatir (1.6.2)
  fxri (0.3.7, 0.3.6)
  fxruby (1.6.19, 1.6.12)
  hoe (2.3.3)
  hoe-seattlerb (1.2.1)
  hpricot (0.8.2, 0.6)
  json_pure (1.1.9)
  log4r (1.1.2, 1.0.5)
  markaby (0.5)
  metaid (1.0)
  minitest (1.4.2)
  polyglot (0.2.9)
  rack (1.0.1)
  rails (2.3.4)
  rake (0.8.7, 0.7.3)
  rspec (1.2.9)
  rubyforge (2.0.3)
  rubygems-update (1.3.5)
  s4t-utils (1.0.4)
  session (2.4.0)
  sources (0.0.1)
  term-ansicolor (1.0.4)
  test-spec (0.10.0)
  treetop (1.4.2)
  user-choices (1.1.6)
  watir (1.6.2)
  win32-api (1.4.5, 1.0.4)
  win32-clipboard (0.5.2, 0.4.3)
  win32-dir (0.3.5, 0.3.2)
  win32-eventlog (0.5.2, 0.4.6)
  win32-file (0.6.3, 0.5.4)
  win32-file-stat (1.3.4, 1.2.7)
  win32-process (0.6.1, 0.5.3)
  win32-sapi (0.1.5, 0.1.4)
  win32-sound (0.4.2, 0.4.1)
  win32console (1.2.0)
  win32ole-pp (1.2.0)
  windows-api (0.4.0, 0.2.0)
  windows-pr (1.0.8, 0.7.2)
  xml-simple (1.0.12)

  Is there any gem that I am missing that is causing the error?

  On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:

  I removed include Watir now my script is:

  require 'watir'
  require 'rubygems'
  #require win32ole

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).click

  I still get the same error message. I am using watir 1.4.1. Below is
  my ruby version

  C:\rubyruby --version
  ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

  I have done gem update prevsiously, gem system updates but nothing
  works. Any ideas on what I can do to get a basic script up and running
  using watir?

  On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:

  Hi,

  Add first line -- require 'rubygems'
  Remove line no.2 -- include Watir

  I hope it works now. If its not working then Please provide more

  details

  about Watir Verison and Ruby version.

  Thanks

  On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com

  wrote:

  I am trying to run a watir script:

  require 'watir'
  include Watir

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).submit

  when I run it from command line ruby filename.rb I get the following
  error message:

  c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
  unknown proper
  ty or method `document' (WIN32OLERuntimeError)
     HRESULT error code:0x800706ba
       The RPC server is unavailable.    from c:/ruby/lib/ruby/
  site_ruby/1.8/watir.rb:1336:in `document'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
  `getContainerContents'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
  `getObject'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
  `initialize'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
  `text_field'
         from script1.rb:6

  Any Ideas.?

  --
  Regards,
  P.Raveendranhttp://raveendran.wordpress.com-Hidequotedtext -

  - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

  - Show quoted text -

 --
 Bret Pettichord
 Lead Developer, Watir,www.watir.com
 Blog,www.io.com/~wazmo/blog
 Twitter,www.twitter.com/bpettichord- 

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread orde

 1. How do I check my envirnoment variables for ruby?

This will give you the list (from command line): ruby -e 'puts
global_variables.sort'

This will give you the value for an individual env var: ruby -e 'puts
[env_var]'.  For example: ruby - e 'puts $DEBUG'

orde

On Nov 10, 8:47 am, tester86 sagar.am...@gmail.com wrote:
 I do not think that it is a permission an issue and I am using windows
 vista but going to be working on windows 7 soon. I do not know how to
 get a stack trace from my output. In my previous posts shows the error
 message that I get in command prompt.

 Question:

 1. How do I check my envirnoment variables for ruby?

 On Nov 10, 9:38 am, Bret Pettichord b...@pettichord.com wrote:

  I am wondering if maybe this is a permissions problem. Are you using
  Windows 7?

  It would help if you printed the error and stack trace that you are now
  getting.

  Bret

  tester86 wrote:
   This morning I just upgraded to watir 1.6.2 and I also switched the
   lines but I still got the same output.

   On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com
   wrote:

   In a previous email, you indicate that you're running Watir 1.4.1.  But, 
   the
   below indicates that you're on 1.6.2.

   In any case, I tried running your code and it worked fine. (What happens 
   if
   you switch the require 'watir' and require 'rubygems' lines? Could that 
   be
   the source of your problem? Further, do you have the variable RUBYOPT 
   set in
   your environment variables with the value of 'rubygems'?)

   That is:
   require 'watir'
   require 'rubygems'
   #require win32ole

   ie = Watir::IE.new
   ie.goto(http://google.com;)

   ie.text_field(:name, q).set(watir)
   ie.button(:name, btnG).click

   On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote:

   Here is the list of my local gems (just incase its helps)

   *** LOCAL GEMS ***

   actionmailer (2.3.4)
   actionpack (2.3.4)
   activerecord (2.3.4)
   activeresource (2.3.4)
   activesupport (2.3.4)
   builder (2.1.2)
   camping (1.5.180)
   commonwatir (1.6.2)
   cucumber (0.4.3)
   diff-lcs (1.1.2)
   firewatir (1.6.2)
   fxri (0.3.7, 0.3.6)
   fxruby (1.6.19, 1.6.12)
   hoe (2.3.3)
   hoe-seattlerb (1.2.1)
   hpricot (0.8.2, 0.6)
   json_pure (1.1.9)
   log4r (1.1.2, 1.0.5)
   markaby (0.5)
   metaid (1.0)
   minitest (1.4.2)
   polyglot (0.2.9)
   rack (1.0.1)
   rails (2.3.4)
   rake (0.8.7, 0.7.3)
   rspec (1.2.9)
   rubyforge (2.0.3)
   rubygems-update (1.3.5)
   s4t-utils (1.0.4)
   session (2.4.0)
   sources (0.0.1)
   term-ansicolor (1.0.4)
   test-spec (0.10.0)
   treetop (1.4.2)
   user-choices (1.1.6)
   watir (1.6.2)
   win32-api (1.4.5, 1.0.4)
   win32-clipboard (0.5.2, 0.4.3)
   win32-dir (0.3.5, 0.3.2)
   win32-eventlog (0.5.2, 0.4.6)
   win32-file (0.6.3, 0.5.4)
   win32-file-stat (1.3.4, 1.2.7)
   win32-process (0.6.1, 0.5.3)
   win32-sapi (0.1.5, 0.1.4)
   win32-sound (0.4.2, 0.4.1)
   win32console (1.2.0)
   win32ole-pp (1.2.0)
   windows-api (0.4.0, 0.2.0)
   windows-pr (1.0.8, 0.7.2)
   xml-simple (1.0.12)

   Is there any gem that I am missing that is causing the error?

   On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:

   I removed include Watir now my script is:

   require 'watir'
   require 'rubygems'
   #require win32ole

   ie = Watir::IE.new
   ie.goto(http://google.com;)

   ie.text_field(:name, q).set(watir)
   ie.button(:name, btnG).click

   I still get the same error message. I am using watir 1.4.1. Below is
   my ruby version

   C:\rubyruby --version
   ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

   I have done gem update prevsiously, gem system updates but nothing
   works. Any ideas on what I can do to get a basic script up and running
   using watir?

   On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:

   Hi,

   Add first line -- require 'rubygems'
   Remove line no.2 -- include Watir

   I hope it works now. If its not working then Please provide more

   details

   about Watir Verison and Ruby version.

   Thanks

   On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com

   wrote:

   I am trying to run a watir script:

   require 'watir'
   include Watir

   ie = Watir::IE.new
   ie.goto(http://google.com;)

   ie.text_field(:name, q).set(watir)
   ie.button(:name, btnG).submit

   when I run it from command line ruby filename.rb I get the following
   error message:

   c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
   unknown proper
   ty or method `document' (WIN32OLERuntimeError)
      HRESULT error code:0x800706ba
        The RPC server is unavailable.    from c:/ruby/lib/ruby/
   site_ruby/1.8/watir.rb:1336:in `document'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
   `getContainerContents'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
   `getObject'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
   `initialize'
          from 

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread Jason Trebilcock
Not exactly what I had in mind when I mentioned checking the environment
variables.

For Windows:
Control Panel = System = Advanced = Environment Variables.

On Tue, Nov 10, 2009 at 11:06 AM, orde ohil...@gmail.com wrote:


  1. How do I check my envirnoment variables for ruby?

 This will give you the list (from command line): ruby -e 'puts
 global_variables.sort'

 This will give you the value for an individual env var: ruby -e 'puts
 [env_var]'.  For example: ruby - e 'puts $DEBUG'

 orde

 On Nov 10, 8:47 am, tester86 sagar.am...@gmail.com wrote:
  I do not think that it is a permission an issue and I am using windows
  vista but going to be working on windows 7 soon. I do not know how to
  get a stack trace from my output. In my previous posts shows the error
  message that I get in command prompt.
 
  Question:
 
  1. How do I check my envirnoment variables for ruby?
 
  On Nov 10, 9:38 am, Bret Pettichord b...@pettichord.com wrote:
 
   I am wondering if maybe this is a permissions problem. Are you using
   Windows 7?
 
   It would help if you printed the error and stack trace that you are now
   getting.
 
   Bret
 
   tester86 wrote:
This morning I just upgraded to watir 1.6.2 and I also switched the
lines but I still got the same output.
 
On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com
wrote:
 
In a previous email, you indicate that you're running Watir 1.4.1.
  But, the
below indicates that you're on 1.6.2.
 
In any case, I tried running your code and it worked fine. (What
 happens if
you switch the require 'watir' and require 'rubygems' lines? Could
 that be
the source of your problem? Further, do you have the variable
 RUBYOPT set in
your environment variables with the value of 'rubygems'?)
 
That is:
require 'watir'
require 'rubygems'
#require win32ole
 
ie = Watir::IE.new
ie.goto(http://google.com;)
 
ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).click
 
On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com
 wrote:
 
Here is the list of my local gems (just incase its helps)
 
*** LOCAL GEMS ***
 
actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (2.3.4)
builder (2.1.2)
camping (1.5.180)
commonwatir (1.6.2)
cucumber (0.4.3)
diff-lcs (1.1.2)
firewatir (1.6.2)
fxri (0.3.7, 0.3.6)
fxruby (1.6.19, 1.6.12)
hoe (2.3.3)
hoe-seattlerb (1.2.1)
hpricot (0.8.2, 0.6)
json_pure (1.1.9)
log4r (1.1.2, 1.0.5)
markaby (0.5)
metaid (1.0)
minitest (1.4.2)
polyglot (0.2.9)
rack (1.0.1)
rails (2.3.4)
rake (0.8.7, 0.7.3)
rspec (1.2.9)
rubyforge (2.0.3)
rubygems-update (1.3.5)
s4t-utils (1.0.4)
session (2.4.0)
sources (0.0.1)
term-ansicolor (1.0.4)
test-spec (0.10.0)
treetop (1.4.2)
user-choices (1.1.6)
watir (1.6.2)
win32-api (1.4.5, 1.0.4)
win32-clipboard (0.5.2, 0.4.3)
win32-dir (0.3.5, 0.3.2)
win32-eventlog (0.5.2, 0.4.6)
win32-file (0.6.3, 0.5.4)
win32-file-stat (1.3.4, 1.2.7)
win32-process (0.6.1, 0.5.3)
win32-sapi (0.1.5, 0.1.4)
win32-sound (0.4.2, 0.4.1)
win32console (1.2.0)
win32ole-pp (1.2.0)
windows-api (0.4.0, 0.2.0)
windows-pr (1.0.8, 0.7.2)
xml-simple (1.0.12)
 
Is there any gem that I am missing that is causing the error?
 
On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:
 
I removed include Watir now my script is:
 
require 'watir'
require 'rubygems'
#require win32ole
 
ie = Watir::IE.new
ie.goto(http://google.com;)
 
ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).click
 
I still get the same error message. I am using watir 1.4.1. Below
 is
my ruby version
 
C:\rubyruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
 
I have done gem update prevsiously, gem system updates but nothing
works. Any ideas on what I can do to get a basic script up and
 running
using watir?
 
On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:
 
Hi,
 
Add first line -- require 'rubygems'
Remove line no.2 -- include Watir
 
I hope it works now. If its not working then Please provide more
 
details
 
about Watir Verison and Ruby version.
 
Thanks
 
On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com
 
 
wrote:
 
I am trying to run a watir script:
 
require 'watir'
include Watir
 
ie = Watir::IE.new
ie.goto(http://google.com;)
 
ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).submit
 
when I run it from command line ruby filename.rb I get the
 following
error message:
 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in
 `method_missing':
unknown proper
ty or method `document' (WIN32OLERuntimeError)
   HRESULT error code:0x800706ba
 

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread Bret Pettichord

You posted a stack trace earlier. This is displayed after the error 
message. If you are still getting exactly the same stack trace, then you 
are still using the old version of watir. A new version of watir will 
result in a somewhat different stack trace.

You can type set at a command prompt to see your environment variables.

Why do you say that you don't think it is a permissions issue? To me, it 
suggests you don't have access to the document object. How do you 
interpret the error message?

Bret

tester86 wrote:
 I do not think that it is a permission an issue and I am using windows
 vista but going to be working on windows 7 soon. I do not know how to
 get a stack trace from my output. In my previous posts shows the error
 message that I get in command prompt.

 Question:

 1. How do I check my envirnoment variables for ruby?


 On Nov 10, 9:38 am, Bret Pettichord b...@pettichord.com wrote:
   
 I am wondering if maybe this is a permissions problem. Are you using
 Windows 7?

 It would help if you printed the error and stack trace that you are now
 getting.

 Bret





 tester86 wrote:
 
 This morning I just upgraded to watir 1.6.2 and I also switched the
 lines but I still got the same output.
   
 On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com
 wrote:
   
 In a previous email, you indicate that you're running Watir 1.4.1.  But, 
 the
 below indicates that you're on 1.6.2.
 
 In any case, I tried running your code and it worked fine. (What happens if
 you switch the require 'watir' and require 'rubygems' lines? Could that be
 the source of your problem? Further, do you have the variable RUBYOPT set 
 in
 your environment variables with the value of 'rubygems'?)
 
 That is:
 require 'watir'
 require 'rubygems'
 #require win32ole
 
 ie = Watir::IE.new
 ie.goto(http://google.com;)
 
 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).click
 
 On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote:
 
 Here is the list of my local gems (just incase its helps)
   
 *** LOCAL GEMS ***
   
 actionmailer (2.3.4)
 actionpack (2.3.4)
 activerecord (2.3.4)
 activeresource (2.3.4)
 activesupport (2.3.4)
 builder (2.1.2)
 camping (1.5.180)
 commonwatir (1.6.2)
 cucumber (0.4.3)
 diff-lcs (1.1.2)
 firewatir (1.6.2)
 fxri (0.3.7, 0.3.6)
 fxruby (1.6.19, 1.6.12)
 hoe (2.3.3)
 hoe-seattlerb (1.2.1)
 hpricot (0.8.2, 0.6)
 json_pure (1.1.9)
 log4r (1.1.2, 1.0.5)
 markaby (0.5)
 metaid (1.0)
 minitest (1.4.2)
 polyglot (0.2.9)
 rack (1.0.1)
 rails (2.3.4)
 rake (0.8.7, 0.7.3)
 rspec (1.2.9)
 rubyforge (2.0.3)
 rubygems-update (1.3.5)
 s4t-utils (1.0.4)
 session (2.4.0)
 sources (0.0.1)
 term-ansicolor (1.0.4)
 test-spec (0.10.0)
 treetop (1.4.2)
 user-choices (1.1.6)
 watir (1.6.2)
 win32-api (1.4.5, 1.0.4)
 win32-clipboard (0.5.2, 0.4.3)
 win32-dir (0.3.5, 0.3.2)
 win32-eventlog (0.5.2, 0.4.6)
 win32-file (0.6.3, 0.5.4)
 win32-file-stat (1.3.4, 1.2.7)
 win32-process (0.6.1, 0.5.3)
 win32-sapi (0.1.5, 0.1.4)
 win32-sound (0.4.2, 0.4.1)
 win32console (1.2.0)
 win32ole-pp (1.2.0)
 windows-api (0.4.0, 0.2.0)
 windows-pr (1.0.8, 0.7.2)
 xml-simple (1.0.12)
   
 Is there any gem that I am missing that is causing the error?
   
 On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:
   
 I removed include Watir now my script is:
 
 require 'watir'
 require 'rubygems'
 #require win32ole
 
 ie = Watir::IE.new
 ie.goto(http://google.com;)
 
 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).click
 
 I still get the same error message. I am using watir 1.4.1. Below is
 my ruby version
 
 C:\rubyruby --version
 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
 
 I have done gem update prevsiously, gem system updates but nothing
 works. Any ideas on what I can do to get a basic script up and running
 using watir?
 
 On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:
 
 Hi,
   
 Add first line -- require 'rubygems'
 Remove line no.2 -- include Watir
   
 I hope it works now. If its not working then Please provide more
   
 details
   
 about Watir Verison and Ruby version.
   
 Thanks
   
 On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com
   
 wrote:
   
 I am trying to run a watir script:
 
 require 'watir'
 include Watir
 
 ie = Watir::IE.new
 ie.goto(http://google.com;)
 
 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).submit
 
 when I run it from command line ruby filename.rb I get the following
 error message:
 
 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
 unknown proper
 ty or method `document' (WIN32OLERuntimeError)
HRESULT error code:0x800706ba
  

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

Thanks for all the help I managed to get ruby and watir all up and
running. But I have a question, when I was using cucumber I get this
error message and they told me to put this post in the watir group:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_exists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObje
ctException)
  from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:323:in `set'
from script1.rb:8

When you have a watir script why cannot find the text box and the
search box for google.My script is still the same. Is there some other
syntax that I need to use?


--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread Bret Pettichord

My guess is that the browser is not actually on the google page at this 
point. You could use statements like this to help troubleshoot:

  puts browser.text
  puts browser.url
  puts browser.title

Bret

tester86 wrote:
 Thanks for all the help I managed to get ruby and watir all up and
 running. But I have a question, when I was using cucumber I get this
 error message and they told me to put this post in the watir group:

 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
 `assert_exists': Unable to locate element, using :name,
 q (Watir::Exception::UnknownObje
 ctException)
   from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:284:in `enabled?'
 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:56:in `assert_enabled'
 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements.rb:323:in `set'
 from script1.rb:8

 When you have a watir script why cannot find the text box and the
 search box for google.My script is still the same. Is there some other
 syntax that I need to use?


 
   


-- 
Bret Pettichord
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord


--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-09 Thread Jason Trebilcock
Per http://wiki.openqa.org/display/WTR/include+Watir
Don't use 'include'

On Mon, Nov 9, 2009 at 3:49 PM, tester86 sagar.am...@gmail.com wrote:


 I am trying to run a watir script:

 require 'watir'
 include Watir

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).submit

 when I run it from command line ruby filename.rb I get the following
 error message:

 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
 unknown proper
 ty or method `document' (WIN32OLERuntimeError)
HRESULT error code:0x800706ba
  The RPC server is unavailable.from c:/ruby/lib/ruby/
 site_ruby/1.8/watir.rb:1336:in `document'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
 `getContainerContents'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
 `getObject'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
 `initialize'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
 `text_field'
from script1.rb:6

 Any Ideas.?
 


--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-09 Thread Bret Pettichord

What version of Watir are you using?

tester86 wrote:
 I am trying to run a watir script:

 require 'watir'
 include Watir

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).submit

 when I run it from command line ruby filename.rb I get the following
 error message:

 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
 unknown proper
 ty or method `document' (WIN32OLERuntimeError)
 HRESULT error code:0x800706ba
   The RPC server is unavailable.from c:/ruby/lib/ruby/
 site_ruby/1.8/watir.rb:1336:in `document'
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
 `getContainerContents'
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
 `getObject'
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
 `initialize'
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
 `text_field'
 from script1.rb:6

 Any Ideas.?
 
   


-- 
Bret Pettichord
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord


--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-09 Thread Raveendran P
Hi,

Add first line -- require 'rubygems'
Remove line no.2 -- include Watir

I hope it works now. If its not working then Please provide more details
about Watir Verison and Ruby version.


Thanks

On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com wrote:


 I am trying to run a watir script:

 require 'watir'
 include Watir

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).submit

 when I run it from command line ruby filename.rb I get the following
 error message:

 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
 unknown proper
 ty or method `document' (WIN32OLERuntimeError)
HRESULT error code:0x800706ba
  The RPC server is unavailable.from c:/ruby/lib/ruby/
 site_ruby/1.8/watir.rb:1336:in `document'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
 `getContainerContents'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
 `getObject'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
 `initialize'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
 `text_field'
from script1.rb:6

 Any Ideas.?
 



-- 
Regards,
P.Raveendran
http://raveendran.wordpress.com

--~--~-~--~~~---~--~~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---