# Watir - Where can I get the latest copy of JavascriptClick.h

**URL:** <https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925>\
**Category:** Ruby\
**Created:** [February 8, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925 "2007-02-08T18:10:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [February 8, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925/1 "2007-02-08T18:10:45Z")

</div>

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.  
  
 \</  
li\>  

  

Results of dialogs:

  
  
  

–Thank You,  
–Mike

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [February 11, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925/2 "2007-02-11T23:05:53Z")

</div>

This question was answered on the removed\_email\_address@domain.invalid mailing  
list, but the short answer is that people should be using Watir 1.5  
at

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [February 11, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925/3 "2007-02-11T23:05:54Z")

</div>

For more information on Watir 1.5, see [http://www.io.com/~wazmo/blog/](http://www.io.com/~wazmo/blog/)  
archives/2006\_07.html#000240

It is mostly complete. The main thing missing is documentation.

Bret

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [February 17, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925/4 "2007-02-17T16:45:43Z")

</div>

On Feb 16, 12:28 pm, “Mike” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [February 16, 2007, 7:30pm UTC](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925/5 "2007-02-16T19:30:45Z")

</div>

On Feb 11, 5:02 pm, “Bret P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [February 19, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925/6 "2007-02-19T15:15:51Z")

</div>

On Feb 17, 10:44 am, “Bret P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

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.

> 1. 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](http://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   
  
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   
  
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’

---

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [February 20, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925/7 "2007-02-20T16:01:04Z")

</div>

On Feb 19, 9:12 am, “Mike” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Feb 17, 10:44 am, “Bret P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

[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]:  
 expected but was  
.

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’

* * *

1. 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”\>.

2. 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”\>.

3. 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’

4. Failure:  
test\_read0(TestZlibGzipReader) [C:/ruby/src/ruby-1.8.5-p12/test/zlib/  
test\_zlib.rb:14]:  
\<“”\> expected but was  
.

5. 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’

* * *

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