Re: [Wtr-general] Problems with Test::Unit in Eclipse

2007-06-30 Thread jim_matt
I reinstalled Eclipse.  I installed:

Eclipse3.2.2
RDT0.9.0
Subclipse1.2.2

and it seems to work with the Eclipse Test::Unit runner.

I did do one major thing differently this time.  I used the default
work area that Eclipse wanted to use, I created my project under the
the default work area for Eclipse, and I created a new copy of each
of the .rb files under the project through Eclipse and copy and pasted
the contents of my original files in there.

Before, I created the project in a directory where I had already been 
working
and imported the .rb files I already had from the file system.  I did this
because I had read somewhere that this version of Eclipse was not as
demanding about you creating everything through it.  Hmmm, maybe not
but this seemed to work.  Maybe I did not have to do all this to get it to
work, but I was more interested in using Eclipse than debugging it.

Jim Matthews

- Original Message - 
From: Bret Pettichord [EMAIL PROTECTED]
To: wtr-general@rubyforge.org
Sent: Wednesday, June 27, 2007 4:07 PM
Subject: Re: [Wtr-general] Problems with Test::Unit in Eclipse


 jim_matt wrote:
 Either I don't get it, or I am not making myself clear.  I am running
 Eclipse 3.2.2 and the latest version of RDT.

 I have statements in my files like the

 $:  File.expand_path(File.dirname(__FILE__))

 That is not the problem!  YOU HAVE TO BE ABLE TO OPEN A FILE BEFORE THE
 ABOVE LINE WORKS!
 When I try to run my top level suite file that requires all my other test
 files from Test::Unit inside Eclipse, it cannot find the top level file. 
 If
 I run the top level suite file from Run Ruby, it finds the file and 
 executes
 it.

 The problem is that Test::Unit in Eclipse cannot find the first file to 
 run
 so it never gets a chance to execute the

 $:  File.expand_path(File.dirname(__FILE__))

 Jim

 At this point it sounds like you need to reinstall Eclipse.
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general 

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Problem with attach using :title

2007-06-30 Thread jim_matt
I wanted to share something I discovered.  I had reported earlier that I 
sometimes I had problems attaching a browser using :title.  The problem turns 
out to be that title is part of the HTML.  The confusion comes because if the 
HTML does not have a title,  IE displays the URL in the title bar of the 
browser.  This makes it look like you should be able to attach the IE browser 
using :title, but the attach will fail with an error like:

Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window 
with title of (?i-mx:whatever you used to match)

This is worth a note in the documentation for matching on :title because it 
certainly looks like it should work.

Jim Matthews

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Problems with Test::Unit in Eclipse

2007-06-26 Thread jim_matt
Thanks Walter,

I think I understand what you are trying to do here.  The problem is that it 
has to open a file first to get the line:

$:  File.expand_path(File.dirname(__FILE__))

So how do you get it to find that first file?

Jim
  - Original Message - 
  From: Walter Kruse 
  To: wtr-general@rubyforge.org 
  Sent: Tuesday, June 26, 2007 12:33 AM
  Subject: Re: [Wtr-general] Problems with Test::Unit in Eclipse


  I use this:

  $:  File.expand_path(File.dirname(__FILE__))

  For exactly that problem

   


--

  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jim_matt
  Sent: 26 June 2007 06:41 AM
  To: wtr-general@rubyforge.org
  Subject: [Wtr-general] Problems with Test::Unit in Eclipse

   

  I realize this is more of an Eclipse problem than a Watir problem, but I know 
some of you use Eclipse and I though maybe you have figured out the solution 
already.

   

  The problem is that I could not get Test Unit Runner in Eclipse to work for 
my Ruby tests.  It appears the problem is that the directory where my test 
files reside in my project is not in the loadpath.  Whenever I tried to run the 
tests with the TU runner in Eclipse, it gave me a load error, saying that it 
could not find the file I was trying to run.

   

  I looked all over trying to find how to add a path to the Eclipse load path, 
but had no success.  I tried Googling Eclipse and Ruby and Test Unit and did 
not turn up anything.

   

  I did get it to work with a real kluge.  I put a file, in the existing 
loadpath, with the same name as the file I was trying to run.  The file 
contains a require statement with the full path to the file I want to run.  
This works for now, but I would like to have a better solution than putting a 
new file for each project in the existing load path.

   

  Does anybody know how to add the the loadpath or come up with a better 
soultion?

   

  Jim Matthews

   

  
*
  Everything in this e-mail and attachments relating to the official business 
of MultiChoice Africa is proprietary to the company. Any view or opinion 
expressed in this message may be the view of the individual and should not 
automatically be ascribed to the company.  If you are not the intended 
recipient, you may not peruse, use, disseminate, distribute or copy this 
message. If you have received this message in error, please notify the sender 
immediately by email, facsimile or telephone and destroy the original message.
  
*


--


  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Problems with Test::Unit in Eclipse

2007-06-26 Thread jim_matt
Either I don't get it, or I am not making myself clear.  I am running 
Eclipse 3.2.2 and the latest version of RDT.

I have statements in my files like the

$:  File.expand_path(File.dirname(__FILE__))

That is not the problem!  YOU HAVE TO BE ABLE TO OPEN A FILE BEFORE THE 
ABOVE LINE WORKS!
When I try to run my top level suite file that requires all my other test 
files from Test::Unit inside Eclipse, it cannot find the top level file.  If 
I run the top level suite file from Run Ruby, it finds the file and executes 
it.

The problem is that Test::Unit in Eclipse cannot find the first file to run 
so it never gets a chance to execute the

$:  File.expand_path(File.dirname(__FILE__))

Jim


- Original Message - 
From: Bill Agee [EMAIL PROTECTED]
To: wtr-general@rubyforge.org
Sent: Tuesday, June 26, 2007 1:16 PM
Subject: Re: [Wtr-general] Problems with Test::Unit in Eclipse


 If you mean the __FILE__ variable, it is a pseudo variable that
 contains the current source file name.  So it will work even when used
 as the first line of a script.

 It's really useful in cases like this, where you need to dynamically
 add dir names to the load path before you try to require other files.


 On 6/26/07, jim_matt [EMAIL PROTECTED] wrote:

 Thanks Walter,

 I think I understand what you are trying to do here.  The problem is that 
 it
 has to open a file first to get the line:

 $:  File.expand_path(File.dirname(__FILE__))

 So how do you get it to find that first file?

 Jim
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general 

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Problems with Test::Unit in Eclipse

2007-06-25 Thread jim_matt
I realize this is more of an Eclipse problem than a Watir problem, but I know 
some of you use Eclipse and I though maybe you have figured out the solution 
already.

The problem is that I could not get Test Unit Runner in Eclipse to work for my 
Ruby tests.  It appears the problem is that the directory where my test files 
reside in my project is not in the loadpath.  Whenever I tried to run the tests 
with the TU runner in Eclipse, it gave me a load error, saying that it could 
not find the file I was trying to run.

I looked all over trying to find how to add a path to the Eclipse load path, 
but had no success.  I tried Googling Eclipse and Ruby and Test Unit and did 
not turn up anything.

I did get it to work with a real kluge.  I put a file, in the existing 
loadpath, with the same name as the file I was trying to run.  The file 
contains a require statement with the full path to the file I want to run.  
This works for now, but I would like to have a better solution than putting a 
new file for each project in the existing load path.

Does anybody know how to add the the loadpath or come up with a better soultion?

Jim Matthews
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] gem error installing 'builder'

2007-06-02 Thread jim_matt
Since no one seemed to have any ideas on how to fix this for Windows 
(searching, I did find some suggestions for Unix type systems),  I decided I 
would have to bite the bullit and try different versions of Ruby and Watir.

I blindly installed a new version of Ruby and a new version of Watir.  I do not 
like to do this because past experience has taught me that I would be trading 
one set of problems for another.  I am happy to report that does not seem to be 
the case this time.  So far, all my scripts are working without a problem.

I installed:

Ruby  1.8.6-25
Watir  1.5.1.1192

Note that I did not install or update rubygems.

I then installed other gems I needed including ci_reporter and builder.

Jim Matthews

  - Original Message - 
  From: jim_matt 
  To: wtr-general@rubyforge.org 
  Sent: Friday, May 18, 2007 10:39 PM
  Subject: [Wtr-general] gem error installing 'builder'


  I am resending this because I have not seen it show up in email distribution. 
 I sent it earlier in the day than the one titled ie.maximize does not always 
work.  I did more research after I sent the following message.  Most of the 
solutions seemed to be for unix based systems.  The best one I found for 
windows appeared to involve completely uninstalling gem 0.9.3 and installing 
gem 0.9.2. 
  The original message I sent follows below.

  
---


  I am getting the following error when I try to install 'builder'.  Any 
suggestions?


  D:\InstalledFiles\builder_2_1_1gem install builder -l -y

  D:\InstalledFiles\builder_2_1_1D:\ruby\bin\ruby.exe D:\ruby\bin\gem 
install builder -
  l -y
  ERROR:  Error installing gem builder[.gem]: install directory 
#Pathname:D:/ruby/lib/ruby/
  gems/1.8/gems/builder-2.1.1 not absolute


  Obviously the error about the pathname not being absolute is incorrect.

  I am running  Ruby 1.8.2-15

  Watir  1.5-1145 as a gem
  gem  0.9.3

  I am trying to set things up so I can get reports with ci_reporter and 
running specific versions of Ruby and Watir to avoid certain bugs.

  Jim Matthews



--


  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Cannot identify a table cell by class in FireWatir

2007-06-02 Thread jim_matt
I know this is mainly for Watir, but I thought some of you might be interested 
in what I found with FireWatir.

One of my goals at the place I am currently working is to have a set of scripts 
that I can run on IE, Firefox, and Safari.  I already have a number of scripts 
working for Watir.  I finally was able to get FireWatir working on my system 
(for those interested, you might want to check out the Google FireWater Group 
discussion at http://groups.google.com/group/firewatir ).

I modified the first script by changing references from Watir to FireWatir.  I 
had anticipated doing this so I changed the

$br = Watir::IE.new

to

$br = FireWatir::Firefox.new

and ran the script.  After correcting a couple editing errors, the script ran 
all the way through.  I was very happy since the script did a number of 
operations that were common to other scripts.

I decided to try this with a second script.  I made the edits and ran the 
script.  This time the script failed because it could not locate a table cell 
that was identified by class.   

$br.cell(:class, x)

This works fine in Watir.  I went back and looked at the cell and the class is 
the only thing that uniqely identifies it.  I 'll have to figure something else 
to do.

Jim Matthews
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] New Watir User Guide (beta)

2007-05-19 Thread jim_matt
I do the same sort of thing now except that I normally do

$br = Water::IE.new

in one place.  I do this for the time I might want to point $br to FireFox and 
run the same script with it.

Jim Matthews
  - Original Message - 
  From: Željko Filipin 
  To: wtr-general@rubyforge.org 
  Sent: Saturday, May 19, 2007 1:41 AM
  Subject: Re: [Wtr-general] New Watir User Guide (beta)


  On 5/18/07, Chris McMahon [EMAIL PROTECTED] wrote:
include Watir  (it's magic anyway, it won't hurt)
ie = IE.new (let people see a blank browser)

  I have just checked my test suite, and I have only one 


  ie = Watir::IE.new

  After that i just use ie variable. I guess that others may have different 
usage pattern for this.

  Zeljko



--


  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] New Watir User Guide (beta)

2007-05-19 Thread jim_matt
Since I now normally do a separate 

$br = Watir::IE

I do a '.new' and then a 'goto' elsewhere.  In this case it brings up 
'about:blank' and does not have to wait for a lot of junk to load.  If you are 
not on a LAN that has access to WWW, then you will wait a long time for 
http://www.google.com.

Jim


  - Original Message - 
  From: Željko Filipin 
  To: wtr-general@rubyforge.org 
  Sent: Saturday, May 19, 2007 1:45 AM
  Subject: Re: [Wtr-general] New Watir User Guide (beta)


  On 5/18/07, Chris McMahon [EMAIL PROTECTED] wrote:
ie = IE.new (let people see a blank browser)
ie.goto(http://www.google.com;)

  I have been thinking about this again. Do you ever do something with an empty 
browser? Every time I open a browser, I immediately go to a web page. I am 
thinking in changing it back to 


  ie = Watir::IE.start(http://www.google.com;)

  Zeljko



--


  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] ie.maximize does not always work

2007-05-18 Thread jim_matt
Interestingly I posted something earlier today and I do not see it in the mail.

Anyway, to the topic at hand.  I have tried to use ie.maximize and ie.minimize 
and they do not seem to work.  Thinking that I might have a problem with my 
Watir installation, I went and ran the unit test with Watir and they worked 
fine.  I went back and ran it on my current browser and it did not work.  Other 
things like ie.close did work.

I have had a similar problem with attach by title.  Sometimes it works but most 
of the time it does not.

I am running IE 6 up to current patches and Watir 1.5.1145.

Anyone have ideas on what is going wrong?

Jim Matthews
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] gem error installing 'builder'

2007-05-18 Thread jim_matt
I am resending this because I have not seen it show up in email distribution.  
I sent it earlier in the day than the one titled ie.maximize does not always 
work.  I did more research after I sent the following message.  Most of the 
solutions seemed to be for unix based systems.  The best one I found for 
windows appeared to involve completely uninstalling gem 0.9.3 and installing 
gem 0.9.2.
The original message I sent follows below.

---


I am getting the following error when I try to install 'builder'.  Any 
suggestions?


D:\InstalledFiles\builder_2_1_1gem install builder -l -y

D:\InstalledFiles\builder_2_1_1D:\ruby\bin\ruby.exe D:\ruby\bin\gem 
install builder -
l -y
ERROR:  Error installing gem builder[.gem]: install directory 
#Pathname:D:/ruby/lib/ruby/
gems/1.8/gems/builder-2.1.1 not absolute


Obviously the error about the pathname not being absolute is incorrect.

I am running  Ruby 1.8.2-15

Watir  1.5-1145 as a gem
gem  0.9.3

I am trying to set things up so I can get reports with ci_reporter and running 
specific versions of Ruby and Watir to avoid certain bugs.

Jim Matthews
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] OLE error code:80070005 in Unknown Access is denied.

2007-04-17 Thread jim_matt
Thanks Bret,

I dropped back to Watir version 1.5.1.1145 and the problem went away.

Jim

- Original Message - 
From: Bret Pettichord [EMAIL PROTECTED]
To: wtr-general@rubyforge.org
Sent: Thursday, April 12, 2007 11:08 PM
Subject: Re: [Wtr-general] OLE error code:80070005 in Unknown Access is 
denied.


 jim_matt wrote:
 Hi guys,

 I got the following error and am having trouble getting around it:

 d:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in
 `method_missing': document (WIN32OLERuntimeError)
 OLE error code:80070005 in Unknown
   Access is denied.
 Use a previous gem. Or build from trunk.

 Bret
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general
 


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] OLE error code:80070005 in Unknown Access is denied.

2007-04-12 Thread jim_matt
Hi guys,

I got the following error and am having trouble getting around it:


d:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in 
`method_missing': document (WIN32OLERuntimeError)
OLE error code:80070005 in Unknown
  Access is denied.


HRESULT error code:0x80020009
  Exception occurred. from 
d:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in `wait'
 from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1829:in `times'
 from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1829:in `wait'
 from d:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:2577:in `click'
 from google-check-out.rb:33
Exit code: 1

I searched the posts and found the following, but it did not help.  I am 
clicking a button that takes IE to a URL in a different domain.  I do 
eventially end up on the right page in IE, but the exception keeps the script 
from continuing.

class Watir::IE
  attr_accessor :error_checkers
end


$ie = Watir::IE.new
$ie.error_checkers = []


Does anyone have any other suggestions?

Thanks,

Jim Matthews


___
Wtr-general mailing list
[EMAIL PROTECTED]
http://rubyforge.org/mailman/listinfo/wtr-general