Problem running Watir script from cruise control

J

Jade Tucker

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

Bret Pettichord

[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

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.


--
Bret Pettichord
GTalk: (e-mail address removed)
CTO, WatirCraft LLC, http://www.watircraft.com
Lead Developer, Watir, http://wtr.rubyforge.org
Blog (Essays), http://www.io.com/~wazmo/blog
MiniBlog (Links), http://feeds.feedburner.com/bretshotlist
 
J

Jade Tucker

Bret said:
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!
 
J

Jade Tucker

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.
 

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

Forum statistics

Threads
473,756
Messages
2,569,531
Members
45,004
Latest member
KetoBoostGummies

Latest Threads

Top