I recently installed Ruby Version 1.8.5p12 and Watir-1.4.1 on a laptop
running Windows XP Professional Version 2002 SP 2 with reasonably
current maintenance. I used gem to install Watir.
I am having problems running all_tests.rb. I installed AutoIt version
3 and registered AutoItX3.dll so I got past the first set of
problems. However the unit tests failed next because
JavascriptClick.htm couldn’t be found. It was no where on my c-
drive. I looked on Fisheye and found version 910 which I copied into
notepad and saved into my Watir unit test path,
“C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1\unittests.html”
I get to the point where JavascriptClick.htm is being executed and a
pop-up window is displayed with text: “Press OK” and a single button
titled “OK” but then things freeze.
Any ideas how to move forward?
Here is the version of JavascriptClick that I am using:
Alert Test
function disp_confirm()
{
testResult = document.getElementById('testResult');
if (confirm("Press a button."))
testResult.value = "You pressed the Confirm
and OK button!";
else
testResult.value = “You pressed the Confirm
and Cancel button!”;
}
function disp_alert()
{
testResult = document.getElementById('testResult');
alert("Press OK")
testResult.value = "You pressed the Alert button!"
}
</script>
</head>
<body>
<form action="get">
<p>There are two basic methods for bringing up dialogs
using javascript.
alert(message) – Display message and
OK button.
confirm(message) – Display message
and OK and Cancel buttons.
I am running on WindowsXP SP2 with latest maintenace. Ruby is version
1.8.5-p12.
You are running the right version.
Try running the core tests (core_tests.rb), which run more
reliably.
I think you’ll need to adjust one of your IE settings to avoid the
error you ran into. I just looked through them and couldn’t find
anything relevant, so i’m not totally sure. Can you tell us which test
actually encountered this problem (i.e. the first error)?
For more information on Watir 1.5, seehttp://www.io.com/~wazmo/blog/
archives/2006_07.html#000240
It is mostly complete. The main thing missing is documentation.
Bret
Bret,
Thank you. Sorry for taking so long to reply. I had a delivery to
take care of.
I downloaded and installed watir-1.5.1.1158 as you suggested. When I
executed the unit tests bad things happened.
339 tests, 300 assertions, 2 failures, 279 errors
I first noticed a problem during the “pass.html” page. A pop-up
window with the text “The webpage you are viewing is trying to close
the window” /n “Do you want to close this window?” and two buttons:
“Yes” and “No” were displayed. The unit test hangs at this point.
After waiting a inute plus I pressed “Yes”. The unit test continued
until a stream of error messages appeared in the command box. The
pattern of pass, fail, and error results reported was:
…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFEE.EEEEEEE.F…EEEE
I am running on WindowsXP SP2 with latest maintenace. Ruby is version
1.8.5-p12.
pattern of pass, fail, and error results reported was:
…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFEE.EEEEEEE.F…EEEE
I am running on WindowsXP SP2 with latest maintenace. Ruby is version
1.8.5-p12.
You are running the right version.
Try running the core tests (core_tests.rb), which run more
reliably.
The core tests ran flawlessly;
200 tests, 1093 assertions, 0 failures, 0 errors
Thank you for your help in this matter. I very much appreciate it.
I think you’ll need to adjust one of your IE settings to avoid the
error you ran into. I just looked through them and couldn’t find
anything relevant, so i’m not totally sure.
I agree that if it runs correctly on your end then it is likely
something on my end; perhaps I am missing an entry in my system path?
Can you tell us which test
actually encountered this problem (i.e. the first error)?
Here are the first three:
Loaded suite C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/unittests/
all_tests
Started
…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFEE.EEEEEEE.F…EEEE
Finished in 166.112 seconds.
[snip]
As an FYI, Ruby itself failed some its Unit Tests. Is this a known
problem with Ruby or a problem with my install?
I ran runner.rb with the following result:
Loaded suite test
Started
…F…F…F…F…F…E…FFF.
Finished in 211.29 seconds.
Failure:
test_reorganize(TestGDBM) [C:/ruby/src/ruby-1.8.5-p12/test/gdbm/
test_gdbm.rb:591]:
expected but was
.
Failure:
test_s_open_create_new(TestGDBM) [C:/ruby/src/ruby-1.8.5-p12/test/gdbm/
test_gdbm.rb:84]:
<420> expected but was
<438>.
Failure:
test_client_auth(OpenSSL::TestSSL)
[C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:157:in test_client_auth' C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:73:in call’
C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:73:in start_server' C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:156:in test_client_auth’]: OpenSSL::SSL::SSLError exception expected but was
Class: Errno::ECONNRESET
Message: <“An existing connection was forcibly closed by the remote
host.”>
—Backtrace—
C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:160:in connect' C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:160:in test_client_auth’
C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:157:in test_client_auth' C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:73:in call’
C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:73:in start_server' C:/ruby/src/ruby-1.8.5-p12/test/openssl/test_ssl.rb:156:in test_client_auth’
Failure:
test_del_trailing_separator_25(TestPathname) [C:/ruby/src/ruby-1.8.5-
p12/test/pathname/test_pathname.rb:27]:
del_trailing_separator(“\225\\”).
<“\225\”> expected but was
<“\225”>.