[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem running Watir script from cruise control

Jade Tucker

8/14/2008 11:10:00 PM

Hi,

I have a watir script to test a MS Sharepoint web site that is being run
by Cruise Control on a windows machine under an administrator account.
I have tested the script on the server just running it through the
command line and it works fine. When i log out and let cruise control
run the test it never stops. I have to log back in and kill the ie
process to see any output in my log file. The log reports that the
windows authentication diaglog was found and enters a username and
password(using autoit) and then it waits to check the title of the
webpage to make sure that it loaded. The script never makes it past
this step (@browser.title() or @browser.html()).

This is part of my cruise control log:
================================================
<![CDATA[
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ie.rb:447:in
`method_missing': unknown property or method `document'
(WIN32OLERuntimeError)
]]>
</message>
- <message priority="info">
- <![CDATA[ HRESULT error code:0x800706ba
]]>
</message>
- <message priority="info">
- <![CDATA[ The RPC server is unavailable. from
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ie.rb:447:in
`document'
]]>
</message>
- <message priority="info">
- <![CDATA[ from
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/page-container.rb:31:in
`page'
]]>
</message>
- <message priority="info">
- <![CDATA[ from
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/page-container.rb:37:in
`html'
]]>
==================================================

I am not sure what is happening. I have tried to print the html data
into my log but that isn't working either. Anyhelp would be much
appreciated. I have another script running firewatir as a scheduled
task and it is working fine.

Thanks for any advice or help you can offer.
--
Posted via http://www.ruby-....

3 Answers

Bret Pettichord

8/14/2008 11:30:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

AutoIt needs to have access to the desktop. Typically cruise control is run
as a service and therefore its process does not have access to the desktop.

I have run Cruise Control as a user program to workaround this problem.

Bret

On Thu, Aug 14, 2008 at 6:10 PM, Jade Tucker <jtucker@xojet.com> wrote:

> Hi,
>
> I have a watir script to test a MS Sharepoint web site that is being run
> by Cruise Control on a windows machine under an administrator account.
> I have tested the script on the server just running it through the
> command line and it works fine. When i log out and let cruise control
> run the test it never stops. I have to log back in and kill the ie
> process to see any output in my log file. The log reports that the
> windows authentication diaglog was found and enters a username and
> password(using autoit) and then it waits to check the title of the
> webpage to make sure that it loaded. The script never makes it past
> this step (@browser.title() or @browser.html()).
>
> This is part of my cruise control log:
> ================================================
> <![CDATA[
> C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ie.rb:447:in
> `method_missing': unknown property or method `document'
> (WIN32OLERuntimeError)
> ]]>
> </message>
> - <message priority="info">
> - <![CDATA[ HRESULT error code:0x800706ba
> ]]>
> </message>
> - <message priority="info">
> - <![CDATA[ The RPC server is unavailable. from
> C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/ie.rb:447:in
> `document'
> ]]>
> </message>
> - <message priority="info">
> - <![CDATA[ from
> C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/page-container.rb:31:in
> `page'
> ]]>
> </message>
> - <message priority="info">
> - <![CDATA[ from
> C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/page-container.rb:37:in
> `html'
> ]]>
> ==================================================
>
> I am not sure what is happening. I have tried to print the html data
> into my log but that isn't working either. Anyhelp would be much
> appreciated. I have another script running firewatir as a scheduled
> task and it is working fine.
>
> Thanks for any advice or help you can offer.
> --
> Posted via http://www.ruby-....
>
>


--
Bret Pettichord
GTalk: bpettichord@gmail.com
CTO, WatirCraft LLC, http://www.wati...
Lead Developer, Watir, http://wtr.rub...
Blog (Essays), http://www.io.com/~...
MiniBlog (Links), http://feeds.feedburner.com/br...

Jade Tucker

8/14/2008 11:35:00 PM

0

Bret Pettichord wrote:
> AutoIt needs to have access to the desktop. Typically cruise control is
> run
> as a service and therefore its process does not have access to the
> desktop.
>
> I have run Cruise Control as a user program to workaround this problem.
>
> Bret

I had my cruise control service running as SYSTEM with the check box
selected to allow interaction with the desktop and that didn't seem to
fix it. I then setup an account for the service to run under thinking
that it may have something to do with IE and user profiles. That didnt
work either.

Based on your suggestion i will try running cruise control from the bat
or executable they provide instead of as a service.

I'll see how it goes. Thanks!
--
Posted via http://www.ruby-....

Jade Tucker

8/15/2008 5:34:00 PM

0

UPDATE:

Running cruise control as a service (with or without a user account) or
running it from the .bat file doesn't fix the problem I am having. I
wanted to just test to see if the program was behaving correctly without
cruise control so, I set a scheduled task to run the script. I set it
to run about 5 minutes after the current time so that I could log off
and wait for it to run. Unfortunately I get the same results - The
script never stops, and I have to log in and kill the IE process. If I
set the scheduled task to run while I am still logged in I can see the
script running and it works perfectly.

I am still looking for any help on this. I feel like I am going to have
to scrap the whole thing for now.

--
Posted via http://www.ruby-....