I have had a problem with tests not completing on Windows XP
professional with the ruby182-15.exe windows installer, and
Watir-1.4.1.exe.  I have attempted a fix, shown in the diff below,
using timeout, but for reasons I don't understand, it doesn't time
out.

In exploring this I found a typo in setup.rb which I show a patch
for below.

Also, I encountered problems at first because of the active content
warnings in IE.  I have left the warning popup to display every
time, because I don't always notice the yellowish stripe at the top
of the page.  While this popup was present, the tests could not
function.  Maybe there is a way to turn it off when doing Watir
tests and restore it to its previous setting afterwards?  [I've had
to take the plunge and just remove it.  I can't remember how to get
it back.]

        Thank you,
        Hugh

[EMAIL PROTECTED] /cygdrive/c/Program Files/Watir/unittests
$ diff -u all_tests{,_new}.rb
--- all_tests.rb        2005-04-30 00:21:07.000000000 +0100
+++ all_tests_new.rb    2006-01-13 13:42:36.328125000 +0000
@@ -2,9 +2,15 @@
 $LOAD_PATH.unshift TOPDIR

 require 'unittests/setup.rb'
+require 'timeout'

+DELAY = 3 * 60
 Dir.chdir TOPDIR
-$all_tests.each {|x| require x}
+$all_tests.each do |x|
+  Timeout::timeout(DELAY) do
+    require x
+  end
+end




[EMAIL PROTECTED] /cygdrive/c/Program Files/Watir/unittests
$ diff -u setup{,_new}.rb
--- setup.rb    2005-08-22 07:38:29.000000000 +0100
+++ setup_new.rb        2006-01-13 13:06:43.453125000 +0000
@@ -17,7 +17,7 @@
                # will be revised to use autoit
                # takes 15 seconds to run
      'images', # failing tests; also assumes working dir is unittests
-     'screen_capture', # is always visible; takes 25 secons
+     'screen_capture', # is always visible; takes 25 seconds
      'filefield', # is always visible; takes 40 seconds
      'jscript',
      'js_events', # is always visible

[EMAIL PROTECTED] /cygdrive/c/Program Files/Watir/unittests
$

The test output is below:


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\hgs>cd C:\Program Files\Watir\unittests

C:\Program Files\Watir\unittests>all_tests_new.rb
Loaded suite C:/Program Files/Watir/unittests/all_tests_new
Started
........FFF..F.F........F..FFF....F.F.................Starting win setFileDialog
 in new process. Setting text file://C:/Program Files/Watir/unittests/html/fileu
pload.html
Starting app: c:/ruby/lib/ruby/site_ruby/1.8/watir/setFileDialog.rb file://C:/Pr
ogram Files/Watir/unittests/html/fileupload.html
...........-----------Objects in  page -------------
                  id=                 src=
button            name=b1             id=b2               value=Click Me      al
t=                src=
                  id=
                  id=                 value=0
                  id=                 value=0
checkbox          name=check1         id=                 value=10            al
t=                src=
checkbox          name=check1         id=                 value=20            al
t=                src=
checkbox          name=check1         id=                 value=30            al
t=                src=
radio             name=r1             id=                 value=a             al
t=                src=
radio             name=r1             id=                 value=b             al
t=                src=
radio             name=r1             id=                 value=c             al
t=                src=
radio             name=r1             id=                 value=d             al
t=                src=
text              name=               id=t1               value=              al
t=                src=
text              name=               id=t2               value=              al
t=                src=
select-one        name=s1             id=                 value=
select-multiple   name=s2             id=                 value=
submit            name=               id=                 value=Submit        al
t=                src=
reset             name=               id=reset_button     value=Reset         al
t=                src=
text              name=g1             id=                 value=textfield     al
t=                src=
button            name=g1             id=                 value=button        al
t=                src=
checkbox          name=g1             id=                 value=1             al
t=                src=
radio             name=g1             id=                 value=2             al
t=                src=
text              name=               id=g1               value=textfield_id  al
t=                src=
button            name=               id=g1               value=button_id     al
t=                src=
checkbox          name=               id=g1               value=1_id          al
t=                src=
radio             name=               id=g1               value=2_id          al
t=                src=
text              name=tt1            id=                 value=              al
t=                src=
image             name=imm            id=                 value=              al
t=submit          src=file:///C:/Program%20Files/Watir/unittests/html/images/but
ton.jpg
hidden            name=hid1           id=                 value=              al
t=                src=
hidden            name=               id=hidden_1         value=              al
t=                src=
button            name=               id=                 value=Show Hidden   al
t=                src=
text              name=vis1           id=                 value=              al
t=                src=
text              name=vis2           id=                 value=              al
t=                src=



.
<BODY>CVS Revision: "$Revision: 1.6 $" <BR><BR>
<TABLE>
<TBODY>
<TR>
<TD>
<FORM action=pass.html method=get><INPUT id=b2 type=button value="Click Me" name
=b1> </FORM>
<TD>
<TR>
<TD>
<FORM name=test2 action=pass2.html method=get>
<UL>
<LI>ListItem1
<LI><SPAN>ListItem2</SPAN> </LI></UL><BR><INPUT type=checkbox value=10 name=chec
k1> <BR><INPUT type=checkbox value=20 name=check1> <BR><INPUT type=checkbox valu
e=30 name=check1> <BR><INPUT type=radio value=a name=r1 selected> <BR><INPUT typ
e=radio value=b name=r1> <BR><INPUT type=radio value=c name=r1> <BR><INPUT type=
radio value=d name=r1> <BR><INPUT id=t1> <BR><INPUT id=t2> <BR><SELECT name=s1>
<OPTION selected>1</OPTION> <OPTION>2</OPTION></SELECT> <BR><SELECT multiple nam
e=s2 visible="3"> <OPTION>1</OPTION> <OPTION>2</OPTION> <OPTION>3</OPTION> <OPTI
ON>4</OPTION> <OPTION>5</OPTION> <OPTION>6</OPTION></SELECT> <BR><INPUT type=sub
mit value=Submit><INPUT id=reset_button type=reset value=Reset> </FORM>
<TD>
<TR bgColor=blue>
<TD><INPUT value=textfield name=g1> <BR><INPUT type=button value=button name=g1>
 <BR><INPUT type=checkbox value=1 name=g1> <BR><INPUT type=radio value=2 name=g1
> <BR>
<TD>These objects all have the same name
<TR bgColor=lightblue>
<TD><INPUT id=g1 value=textfield_id> <BR><INPUT id=g1 type=button value=button_i
d> <BR><INPUT id=g1 type=checkbox value=1_id> <BR><INPUT id=g1 type=radio value=
2_id> <BR>
<TD>These objects all have the same id
<TR>
<TD>
<FORM name=buttonsubmit action=pass.html method=get>This form is has a submit bu
tton that is an image <INPUT name=tt1> <INPUT type=image alt=submit src="images/
button.jpg" name=imm> </FORM>
<FORM name=has_a_hidden>This is in a form. The form has hidden objects. <BR>The
first has a name - hid1<INPUT type=hidden name=hid1> <BR>The second has an id- h
idden_1<INPUT id=hidden_1 type=hidden> Click This Button to see the values in th
ese boxes <INPUT onclick=javascript:showHidden(); type=button value="Show Hidden
"> <BR><INPUT name=vis1> <BR><INPUT name=vis2> </FORM></TR></TBODY></TABLE></BOD
Y>
.CVS Revision: "$Revision: 1.6 $"


ListItem1
ListItem2










 1 2
 1 2 3 4 5 6





These objects all have the same name




These objects all have the same id
This form is has a submit button that is an image
This is in a form. The form has hidden objects.
The first has a name - hid1
The second has an id- hidden_1 Click This Button to see the values in these boxe
s
.There are 4 forms
Form name:
       id:
   method: get
   action: pass.html
Form name: test2
       id:
   method: get
   action: pass2.html
Form name: buttonsubmit
       id:
   method: get
   action: pass.html
Form name: has_a_hidden
       id:
   method: get
   action:
...............FF.FF.FEEFFiring event to make button enabled
Clicking the button
E.F..F




_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to