# Problem running Watir script from cruise control

**URL:** <https://www.ruby-forum.com/t/problem-running-watir-script-from-cruise-control/145916>\
**Category:** Ruby\
**Created:** [August 15, 2008, 1:12am UTC](https://www.ruby-forum.com/t/problem-running-watir-script-from-cruise-control/145916 "2008-08-15T01:12:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtucker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c6cbf5/32.png) [@jtucker](https://www.ruby-forum.com/u/jtucker)\
**Post date:** [August 15, 2008, 1:12am UTC](https://www.ruby-forum.com/t/problem-running-watir-script-from-cruise-control/145916/1 "2008-08-15T01:12:53Z")

</div>

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:
 - - - - - - - - ==================================================

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.

---

<div class="post-metadata">

**Author:** ![jtucker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c6cbf5/32.png) [@jtucker](https://www.ruby-forum.com/u/jtucker)\
**Post date:** [August 15, 2008, 1:33am UTC](https://www.ruby-forum.com/t/problem-running-watir-script-from-cruise-control/145916/2 "2008-08-15T01:33:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jtucker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c6cbf5/32.png) [@jtucker](https://www.ruby-forum.com/u/jtucker)\
**Post date:** [August 15, 2008, 1:38am UTC](https://www.ruby-forum.com/t/problem-running-watir-script-from-cruise-control/145916/3 "2008-08-15T01:38:12Z")

</div>

Bret P. 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!

---

<div class="post-metadata">

**Author:** ![jtucker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c6cbf5/32.png) [@jtucker](https://www.ruby-forum.com/u/jtucker)\
**Post date:** [August 15, 2008, 7:37pm UTC](https://www.ruby-forum.com/t/problem-running-watir-script-from-cruise-control/145916/4 "2008-08-15T19:37:13Z")

</div>

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.
