Re: [Wtr-general] Best way to log Watir output?

2006-07-24 Thread Bret Pettichord
Please don't include the text from an entire digest in your posts. It makes the thread very difficult to read.Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Best way to log Watir output?

2006-07-19 Thread Adam Reed
What is the best way to create a log file, or otherwise manipulate Watir
test output?

I am looking a building a framework for testing, and it would be nice to
output test results to a webpage, flat file, or even to a dashboard
results window.  I would want to include variables used (eg,
username/password for a login script, this seems straightforward), but
most importantly assertion results, test date and time, etc.

Thanks,
Adam 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, July 18, 2006 9:37 PM
To: wtr-general@rubyforge.org
Subject: Wtr-general Digest, Vol 32, Issue 26

Send Wtr-general mailing list submissions to
wtr-general@rubyforge.org

To subscribe or unsubscribe via the World Wide Web, visit
http://rubyforge.org/mailman/listinfo/wtr-general
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific than
Re: Contents of Wtr-general digest...


Today's Topics:

   1. Re: Install problem? (Simo, Ben)
   2. problem with nested frames (Xavier Noria)
   3. for loop syntax?? (mi)
   4. Page Loading Problem (David Solis)


--

Message: 1
Date: Tue, 18 Jul 2006 13:34:18 -0600
From: Simo, Ben [EMAIL PROTECTED]
Subject: Re: [Wtr-general] Install problem?
To: wtr-general@rubyforge.org
Message-ID:

[EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

I just reinstalled WATIR using the GEM file instead of the one-step
install.  Now it works.  Thank you.
 
 
Ben

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 1:30 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Install problem?



I just remembered, one of the last times I installed ruby (either rc 3
or final I can't remember which) blew away ALL of my path information.
You might check to make sure ruby/bin and ruby/lib are in your path
environment variable.

 

--Mark

 


  _  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simo, Ben
Sent: Tuesday, July 18, 2006 12:21 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Install problem?

 

Mark,

 

Thanks, but that didn't seem to fix the problem.  I am having the same
problem on two different Windows XP PCs (one SP1, the other SP2). 

 

Ben

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 8:14 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Install problem?

I have always had to install rubygems for a new ruby install.

 

Get the gem here:

http://rubyforge.org/projects/rubygems/

 

Download it somewhere.  Open a command prompt and navigate to where you
downloaded it.  Type gem install rubygems*.gem

 

This fix the same problem for me on a new install.

 

Hope this helps,

 

--Mark

 


  _  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simo, Ben
Sent: Monday, July 17, 2006 3:45 PM
To: Wtr-general@rubyforge.org
Subject: [Wtr-general] Install problem?

 

Hello, 

I have just installed Ruby and WATIR on a Windows XP box. 

When I try to run the unit tests, I get an error stating that
gem_original_require is missing. 

 

C:\watir\unittestsall_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- watir (LoadError)

from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require' 
from C:/watir/unittests/../unittests/setup.rb:4 
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require' 
from C:/watir/unittests/all_tests.rb:4 

 

I'm not sure if it matters: when I installed WATIR from the .exe
package, I got errors about not being able to write to c:\watir until I
manually created the directory.  I manually created the c:\watir
directory and then installed to it.

Any ideas why I can't run the all_tests.rb script? 

Thank you, 

Ben Simo 

 


  _  


The information contained in this message is intended only for the
recipient, and may be a confidential attorney-client communication or
may otherwise be privileged and confidential and protected from
disclosure. If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this message to the
intended recipient, please be aware that any dissemination or copying of
this communication is strictly prohibited. If you have received this
communication in error, please immediately notify us by replying to the
message and deleting it from your computer. 


  _  


-- next part --
An HTML attachment was scrubbed...
URL:

Re: [Wtr-general] Best way to log Watir output?

2006-07-19 Thread Charley Baker
Adam,  If you want to create a log file look at logger which is a Ruby library, Watir makes use of it in WatirLogger. Otherwise if you're looking for a junit type of test run dashboard and you're using Test::Unit, take a look at Test Unit Reporter: 
http://rubyforge.org/frs/?group_id=319It can dump out reports in either html or xml. -CharleyOn 7/19/06, 
Adam Reed [EMAIL PROTECTED] wrote:
What is the best way to create a log file, or otherwise manipulate Watirtest output?I am looking a building a framework for testing, and it would be nice tooutput test results to a webpage, flat file, or even to a dashboard
results window.I would want to include variables used (eg,username/password for a login script, this seems straightforward), butmost importantly assertion results, test date and time, etc.
Thanks,Adam
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Best way to log Watir output?

2006-07-19 Thread Michael Bolton
Ruby's Logger object?  What do you mean by best?

---Michael B.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adam Reed
Sent: July 19, 2006 9:51 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Best way to log Watir output?

What is the best way to create a log file, or otherwise manipulate Watir
test output?

I am looking a building a framework for testing, and it would be nice to
output test results to a webpage, flat file, or even to a dashboard
results window.  I would want to include variables used (eg,
username/password for a login script, this seems straightforward), but
most importantly assertion results, test date and time, etc.

Thanks,
Adam 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, July 18, 2006 9:37 PM
To: wtr-general@rubyforge.org
Subject: Wtr-general Digest, Vol 32, Issue 26

Send Wtr-general mailing list submissions to
wtr-general@rubyforge.org

To subscribe or unsubscribe via the World Wide Web, visit
http://rubyforge.org/mailman/listinfo/wtr-general
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific than
Re: Contents of Wtr-general digest...


Today's Topics:

   1. Re: Install problem? (Simo, Ben)
   2. problem with nested frames (Xavier Noria)
   3. for loop syntax?? (mi)
   4. Page Loading Problem (David Solis)


--

Message: 1
Date: Tue, 18 Jul 2006 13:34:18 -0600
From: Simo, Ben [EMAIL PROTECTED]
Subject: Re: [Wtr-general] Install problem?
To: wtr-general@rubyforge.org
Message-ID:

[EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

I just reinstalled WATIR using the GEM file instead of the one-step
install.  Now it works.  Thank you.
 
 
Ben

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 1:30 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Install problem?



I just remembered, one of the last times I installed ruby (either rc 3
or final I can't remember which) blew away ALL of my path information.
You might check to make sure ruby/bin and ruby/lib are in your path
environment variable.

 

--Mark

 


  _  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simo, Ben
Sent: Tuesday, July 18, 2006 12:21 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Install problem?

 

Mark,

 

Thanks, but that didn't seem to fix the problem.  I am having the same
problem on two different Windows XP PCs (one SP1, the other SP2). 

 

Ben

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Cain, Mark
Sent: Tuesday, July 18, 2006 8:14 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Install problem?

I have always had to install rubygems for a new ruby install.

 

Get the gem here:

http://rubyforge.org/projects/rubygems/

 

Download it somewhere.  Open a command prompt and navigate to where you
downloaded it.  Type gem install rubygems*.gem

 

This fix the same problem for me on a new install.

 

Hope this helps,

 

--Mark

 


  _  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simo, Ben
Sent: Monday, July 17, 2006 3:45 PM
To: Wtr-general@rubyforge.org
Subject: [Wtr-general] Install problem?

 

Hello, 

I have just installed Ruby and WATIR on a Windows XP box. 

When I try to run the unit tests, I get an error stating that
gem_original_require is missing. 

 

C:\watir\unittestsall_tests.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- watir (LoadError)

from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require' 
from C:/watir/unittests/../unittests/setup.rb:4 
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require' 
from C:/watir/unittests/all_tests.rb:4 

 

I'm not sure if it matters: when I installed WATIR from the .exe
package, I got errors about not being able to write to c:\watir until I
manually created the directory.  I manually created the c:\watir
directory and then installed to it.

Any ideas why I can't run the all_tests.rb script? 

Thank you, 

Ben Simo 

 


  _  


The information contained in this message is intended only for the
recipient, and may be a confidential attorney-client communication or
may otherwise be privileged and confidential and protected from
disclosure. If the reader of this message is not the intended recipient,
or an employee or agent responsible for delivering this message to the
intended recipient, please be aware that any dissemination or copying of
this communication is strictly prohibited. If you have

Re: [Wtr-general] Best way to log Watir output?

2006-07-19 Thread Adam Reed
 To: wtr-general@rubyforge.org
 Subject: [Wtr-general] for loop syntax??

 Hi all,

 I'm using a for loop to access arrays to fill  all the text fields in 
 my

 forms.  For some reason, i'm getting the following error at the end of

 the for loop execution???
 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': 
 Unable to locate object, using name and
 (Watir::Exception::UnknownObjectException)
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3382:in `set'
 from c:/ruby/lib/ruby/site_ruby/1.8/watir/watir_simple.rb:402:in
 `fill_text_field'
 from SmokeTest.rb:25
 from SmokeTest.rb:24


 Thanks in advance!

 my code

 require 'watir'   # the watir controller\
 require 'watir/watir_simple'
 include Watir
 include Watir::Simple

 Simple1 = Simple

 test_site = 'http://dev01.pheedo.com'
 pubInfoTextFields =  ['user', 'email', 'password', 'repass', 'url', 
 'ssn', 'payment_address', 'payment_city', 'payment_zip'] pubInfo =  
 ['pubUserName', '[EMAIL PROTECTED]', '1', '1', 'http://www.test.com', 
 '1234', '123 st', 'some city', '97035'] #[user name, emaildAdd, 
 passwd1, passwd2, yourSite, TaxID, StreetAdd, CityName, State, 
 ZipCode]

 Simple1.new_browser_at(test_site)
 Simple1.click_link_with_text(Sign up now)  #same as 
 Simple::click_link_with_text(Sign up now)

 #click on Publisher's sign up page
 Simple1.click_link_with_url(test_site+/register.phdo?mode=publish)

 #Enter all the required fields
 x=0
 for x in 0..9 do
   Simple1.fill_text_field(pubInfoTextFields[x], pubInfo[x])
   puts pubInfoTextFields = +pubInfoTextFields[x]+   pubInfo =
 +pubInfo[x]
 end

 ___
 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

-- next part --
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060719/0a9c6244
/attachment-0001.html 

--

Message: 3
Date: Wed, 19 Jul 2006 08:58:34 -0600
From: Charley Baker [EMAIL PROTECTED]
Subject: Re: [Wtr-general] Page Loading Problem
To: wtr-general@rubyforge.org
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

You can turn off image loading in the ie options dialog under advanced.
I'm not aware of any other way to set Watir not to wait for ready state
from the browser.

-Charley

On 7/18/06, David Solis [EMAIL PROTECTED] wrote:

 I have a problem with a site taking too long to load.  I'm hoping 
 somebody can point in the right direction.
 The test environment in which my script runs takes a long time to load

 images. The following statement waits for the page to be loaded:

 $ie.text_field(:name, username).set(casino_user)

 Is there a way that I can force this statement to start running 
 without waiting for the page to completely load?

 class LoginCasino
   def initialize(casino_user, casino_password, casino_url, 
 casino_submit_key, cgc_submit_key)
   $ie = Watir::IE.start(casino_url)
   if $ie.contains_text(Username:)
 $ie.goto($casino_url+/security/logoff.do)
   end
   $ie.text_field(:name, username).set(casino_user)
   $ie.text_field(:name, password).set(casino_password)
 if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
 ($casino_url=~/vgfo/))
   $ie.button(:value, casino_submit_key).click
 elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
   $ie.button(:value, cgc_submit_key).click
 end

  #$ie.image(:src, submit_key).click()
   end
   def logout (casino_url)
 if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
 ($casino_url=~/vgfo/))
   $ie.goto($casino_url+/security/logoff.do)
 elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
   $ie.link(:text, Log Out).click
 end
   end

   def shutdown
$ie.close
sleep 1
   end
 end


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


-- next part --
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060719/431ca445
/attachment-0001.html 

--

Message: 4
Date: Wed, 19 Jul 2006 09:04:29 -0600
From: Charley Baker [EMAIL PROTECTED]
Subject: Re: [Wtr-general] Best way to log Watir output?
To: wtr-general@rubyforge.org
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

Adam,

  If you want to create a log file look at logger which is a Ruby
library, Watir makes use of it in WatirLogger. Otherwise if you're
looking for a junit type of test run dashboard and you're using
Test::Unit, take a look at Test Unit Reporter:
http://rubyforge.org/frs/?group_id=319
It can dump out reports in either html or xml

Re: [Wtr-general] Best way to log Watir output?

2006-07-19 Thread Michael Bolton
The only resource I was able to find online pointed me back to
the test_logger.rb script in watir/examples/logging.  This script
manually logs each action by doing a result/escape on each assertion to
output the result to a .txt file.  While this works, it's tedious and
inefficient for a large script.  I thought there would have to be a
better way, such as grabbing the SCIte output, since it contains
exactly what I would want.

If all you want to do it to grab the output, the simple thing to do is to
pipe the output to a file:

myscript.rb  outputfile.txt

That's simplest; it may not be best.

Someone has now suggested that I take a look at WET to accompany
Ruby.  Is this, or another method, an accepted best practice as far as
Watir scripting goes?

There are no best practices.  Who cares what other people claim is best?
What works for /you/?

---Michael B.

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