3

We use Watir with AutoIT for testing our web apps with IE on Windows. The AutoIT is used where Watir falls short in handling native Windows dialogs (like Windows File dialog for upload).

Because of AutoIT, we are not able to run our tests using task scheduler as AutoIT operations from Watir code need an Interactive Desktop session.

We have tried a few tricks (RDP from a RDP, etc.) but w/ no success and are not able to do true automation.

Any ideas? Open to replacing AutoIT if it can help us achieve true end2end testing automation.

Raj
  • 39
  • 2

3 Answers3

2

We had similar issues when we started running our tests from our TeamCity agents that were running as a service. This is because you are trying to run an interactive process from a service which is not interactive. We switched to have our TeamCity agents run as normal processes and the problem went away.

You may want to look into a build management server to handle running this instead of just using Task Scheduler, but either way you want to avoid running the test process as a service.

JEH
  • 156
  • 5
1

You need to use a scheduler that is running with user permissions. I've previously used CruiseControl.Net to do this.

If your process doesn't have user permissions, it won't have access to desktop windows, which is what you need whether you are using Watir, AutoIT or some other tool. This is a permissions issue, not a tool issue.

Bret Pettichord
  • 455
  • 2
  • 8
  • User permission is not an issue because the service account we use has full admin access to the box. – Raj Oct 08 '10 at 19:01
  • And, we have isolate it to the point where it's the AutoIT script that requires interactive desktop session – Raj Oct 08 '10 at 19:01
  • 1
    The account may have full admin access, but if it is running as a service it won't have access to the desktop. In other words it is a problem with the permissions on the process not the user. – Bret Pettichord Oct 22 '10 at 21:27
-1

I'd replace Watir. ;)

I'm not quite sure about Watir but I believe it's nothing but a wrapper for InternetExplorer.Application COM object, which you can easily use straight from AutoIt with all its functionaly, through ObjCreate("InternetExplorer.Application"), or through user defined functions listed in IE Management section.

I do believe you could script all your testing scenarios only in AutoIt. Why do you need an interactive desktop session?

Kirill Leontev
  • 10,641
  • 7
  • 43
  • 49
  • 1
    I guess you could do some reading on Watir on how/why it's used for web testing :-) There are certain actions where AutoIT script hangs when running as a scheduled task and the same script runs fine when we are logged on to the machine. – Raj Oct 08 '10 at 19:03