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\unittests>all_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:
http://rubyforge.org/pipermail/wtr-general/attachments/20060718/5368a04f
/attachment-0001.html 

------------------------------

Message: 2
Date: Tue, 18 Jul 2006 23:20:38 +0200
From: Xavier Noria <[EMAIL PROTECTED]>
Subject: [Wtr-general] problem with nested frames
To: Wtr-general@rubyforge.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Just in case this rings some bell.

I go to a page that has frames A and B. The latter in turn is a frameset
with 4 frames, say B1, ..., B4. The main area of the page is
B3 and I need to follow a link in B2 to change the main area. Problem is
B3, accessed as

   ie.frame('B').frame('B3')

has the same HTML before and after the link in B2 is clicked. This
website is quite convoluted, but since Watir asks for frames to IE each
time I invoke frame() I don't understand what may be happening.  
Any idea?

-- fxn



------------------------------

Message: 3
Date: Tue, 18 Jul 2006 16:23:15 -0700
From: mi <[EMAIL PROTECTED]>
Subject: [Wtr-general] for loop syntax??
To: wtr-general@rubyforge.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

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



------------------------------

Message: 4
Date: Tue, 18 Jul 2006 19:36:39 -0700 (PDT)
From: David Solis <[EMAIL PROTECTED]>
Subject: [Wtr-general] Page Loading Problem
To: wtr-general@rubyforge.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

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
   
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/wtr-general/attachments/20060718/75ebd76e
/attachment.html 

------------------------------

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

End of Wtr-general Digest, Vol 32, Issue 26
*******************************************


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

Reply via email to