Watir - Where can I get the latest copy of JavascriptClick.htm?

M

Mike

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:

<html>
<head>
<title>Alert Test</title>
<script type="text/javascript">
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.</p>
<ul>
<li>
alert(message) -- Display message and
OK button.<br/>
<input type="button" id="btnAlert"
value="alert" OnClick="disp_alert();" />
</li>
<li>
confirm(message) -- Display message
and OK and Cancel buttons.<br/>
<input type="button" id="btnConfirm"
value="confirm" OnClick="disp_confirm();" /> </
li>
</ul>
<p>Results of dialogs:</p>
<input type="text" style="width:248px;"
id="testResult" value="Test Result" />
</form>
</body>

</html>

--Thank You,
--Mike
 
B

Bret Pettichord

This question was answered on the (e-mail address removed) mailing
list, but the short answer is that people should be using Watir 1.5
at
 
M

Mike

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.

What version of Watir are people actually using?

--Thanks again,
--Mike R.
 
B

Bret Pettichord

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.

You are running the right version.

1. Try running the core tests (core_tests.rb), which run more
reliably.
2. 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)?

Bret
 
M

Mike

You are running the right version.

1. 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.
2. 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?

C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1158\unittests>set path
Path=c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
\System32\Wbem;C:\Prog
ram Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Common
Files\Adap
tec Shared\System;C:\Program Files\Common Files\GTK\2.0\bin;C:
\MSSQL7\BINN;c:\Pr
ogram Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files
\Support Tools\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW
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.

1) Error:
test_alert_without_bonus_script(TC_Dialog_Test):
Watir::Exception::UnknownObjectException:
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/unittests/../watir/
dialog.rb:37:in `click'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/unittests/../
unittests/dialog_test.rb:25:in `test_alert_without_bonus_script'

2) Error:
test_button_name_not_found(TC_Dialog_Test):
WIN32OLERuntimeError: navigate
OLE error code:800700AA in <Unknown>
<No Description>
HRESULT error code:0x80020009
Exception occurred.
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/unittests/../
watir.rb:1692:in `method_missing'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/unittests/../
watir.rb:1692:in `goto'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/unittests/../
unittests/dialog_test.rb:12:in `setup'

3) Error:
test_confirm_ok(TC_Dialog_Test):
WIN32OLERuntimeError: navigate
OLE error code:800700AA in <Unknown>
<No Description>
HRESULT error code:0x80020009
Exception occurred.
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/unittests/../
watir.rb:1692:in `method_missing'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/unittests/../
watir.rb:1692:in `goto'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/unittests/../
unittests/dialog_test.rb:12:in `setup'
 
M

Mike

[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.

1) Failure:
test_reorganize(TestGDBM) [C:/ruby/src/ruby-1.8.5-p12/test/gdbm/
test_gdbm.rb:591]:
<true> expected but was
<false>.

2) 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>.

3) 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'
---------------

4) 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">.

5) Failure:
test_cgi(TestWEBrickCGI)
[C:/ruby/src/ruby-1.8.5-p12/test/webrick/test_cgi.rb:34:in
`test_cgi'
c:/ruby/lib/ruby/1.8/net/http.rb:1050:in `request'
c:/ruby/lib/ruby/1.8/net/http.rb:2133:in `reading_body'
c:/ruby/lib/ruby/1.8/net/http.rb:1049:in `request'
c:/ruby/lib/ruby/1.8/net/http.rb:1034:in `request'
c:/ruby/lib/ruby/1.8/net/http.rb:543:in `start'
c:/ruby/lib/ruby/1.8/net/http.rb:1032:in `request'
C:/ruby/src/ruby-1.8.5-p12/test/webrick/test_cgi.rb:33:in
`test_cgi'
C:/ruby/src/ruby-1.8.5-p12/test/webrick/utils.rb:26:in `call'
C:/ruby/src/ruby-1.8.5-p12/test/webrick/utils.rb:26:in
`start_server'
C:/ruby/src/ruby-1.8.5-p12/test/webrick/utils.rb:34:in
`start_httpserver'
C:/ruby/src/ruby-1.8.5-p12/test/webrick/test_cgi.rb:24:in
`test_cgi']:
<"/\244\333\244\262/\244\333\244\262"> expected but was
<"/\017U\017\375/\017U\017\375">.

6) Error:
test_wsdl(XSD::TestEmptyCharset):
XMLParserError: unknown encoding
c:/ruby/lib/ruby/1.8/xsd/xmlparser/xmlparser.rb:31:in `parse'
c:/ruby/lib/ruby/1.8/xsd/xmlparser/xmlparser.rb:31:in `do_parse'
c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:63:in `parse'
C:/ruby/src/ruby-1.8.5-p12/test/xsd/test_noencoding.rb:15:in
`test_wsdl'

7) Failure:
test_read0(TestZlibGzipReader) [C:/ruby/src/ruby-1.8.5-p12/test/zlib/
test_zlib.rb:14]:
<""> expected but was
<nil>.

8) Failure:
test_ungetc(TestZlibGzipReader) [C:/ruby/src/ruby-1.8.5-p12/test/zlib/
test_zlib.rb:25]:
Exception raised:
Class: <Zlib::GzipFile::CRCError>
Message: <"invalid compressed data -- crc error">
---Backtrace---
C:/ruby/src/ruby-1.8.5-p12/test/zlib/test_zlib.rb:28:in `close'
C:/ruby/src/ruby-1.8.5-p12/test/zlib/test_zlib.rb:28:in `test_ungetc'
C:/ruby/src/ruby-1.8.5-p12/test/zlib/test_zlib.rb:25:in `test_ungetc'
---------------

9) Failure:
test_ungetc_paragraph(TestZlibGzipReader) [C:/ruby/src/ruby-1.8.5-p12/
test/zlib/test_zlib.rb:40]:
Exception raised:
Class: <Zlib::GzipFile::CRCError>
Message: <"invalid compressed data -- crc error">
---Backtrace---
C:/ruby/src/ruby-1.8.5-p12/test/zlib/test_zlib.rb:41:in `read'
C:/ruby/src/ruby-1.8.5-p12/test/zlib/test_zlib.rb:41:in
`test_ungetc_paragraph'
C:/ruby/src/ruby-1.8.5-p12/test/zlib/test_zlib.rb:40:in
`test_ungetc_paragraph'
---------------

1602 tests, 16394 assertions, 8 failures, 1 errors

--Thank you,
--Mike Ramsey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top